POV-Ray : Newsgroups : povray.binaries.animations : Normal-Interpolation (MPG1, 162kb) Server Time
5 Jul 2024 08:41:50 EDT (-0400)
  Normal-Interpolation (MPG1, 162kb) (Message 1 to 8 of 8)  
From: Tim Nikias
Subject: Normal-Interpolation (MPG1, 162kb)
Date: 20 Jan 2005 16:57:48
Message: <41f0295c@news.povray.org>
So, as my modelling attempts haven't harvested many replies, I'm going the
"script"-approach now. :-)

I'm currently working on another set of macros based off of my Surcoat
macros (with which I've already created snow-effects). The new set will
feature hair/fur.

The big issue with hair and POV-Ray is always memory consumption. If you
generate a strand of hair using 20 cones+spheres, and you need lots of hair,
you end up with literally millions of CSG-objects that need to be rendered.
Memory-wise, most renders will surely die the "too little memory
available"-way.

My approach is to create a basic set of hairs and point them in various
directions. When given a normal, I won't generate an entirely new hair, but
rather take one of the pre-created/saved ones and rotate it by the fraction
required to point it correctly.

The animation shows this. The white cone shows the internal normal that has
been selected from the set of the colored cones on the sphere. The "nudging"
bit needs yet to be implemented, along with a better macro for the hair, or
at least some variations. Once I get a running version, I'll probably go
ahead and post an image to p.b.i to check for further comments and
suggestions. :-)

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message


Attachments:
Download 'h_array.mpg' (163 KB)

From: Slime
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 20 Jan 2005 17:46:27
Message: <41f034c3$1@news.povray.org>
> The big issue with hair and POV-Ray is always memory consumption. If you
> generate a strand of hair using 20 cones+spheres, and you need lots of
hair,
> you end up with literally millions of CSG-objects that need to be
rendered.
> Memory-wise, most renders will surely die the "too little memory
> available"-way.
>
> My approach is to create a basic set of hairs and point them in various
> directions. When given a normal, I won't generate an entirely new hair,
but
> rather take one of the pre-created/saved ones and rotate it by the
fraction
> required to point it correctly.

But, copying an existing CSG object doesn't take up any less memory than
creating a new one constructed from the same number and types of primitives.
How would this save anything other than parsing time to create the hairs?

Unless you're going to implement it as a *patch* which avoids actual
duplication in favor of references?

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Slime
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 20 Jan 2005 17:47:24
Message: <41f034fc$1@news.povray.org>
> So, as my modelling attempts haven't harvested many replies, I'm going the
> "script"-approach now. :-)

By the way, despite not replying, I've been moderately fascinated by your
models. I think they need more detail, though.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Tim Nikias
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 21 Jan 2005 01:54:10
Message: <41f0a712@news.povray.org>
> But, copying an existing CSG object doesn't take up any less memory than
> creating a new one constructed from the same number and types of
primitives.
> How would this save anything other than parsing time to create the hairs?

I'm not using CSG. A macro will generate a nice and clean mesh2-object,
those can be instanced with only using memory for an additional pointer
instead of an entire new mesh.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Tim Nikias
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 21 Jan 2005 01:55:40
Message: <41f0a76c$1@news.povray.org>
> By the way, despite not replying, I've been moderately fascinated by your
> models. I think they need more detail, though.

Oh, thanks! :-) The eagle-figurine is in reallife only about 3cm wide, so
that much detail doesn't fit on it. The skull is rather newbie-attempt. I
haven't tried to create a real high-detail model yet, as I would surely be
using some normal-maps in addition to a better texture. But stay tuned, I'll
create something better when I'm more experienced. :-)

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Rune
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 23 Jan 2005 18:44:11
Message: <41f436cb@news.povray.org>
The approach sounds interesting, but I think I need help understanding it.

Am I correct that since in this animation all the cones in the "basic set" 
are identical except for the alignment, choosing a specific one of them is 
pointless except for illustration purposes?

In the real hair macro, the point of selecting from a set of basic hairs is 
that hairs pointing in different direction are affected differently by 
gravity. If you had no gravity, you could have just one hair in the basic 
set and use that one for all the hairs. Is that correct?

What I don't understand is why the set of basic hairs is based on a sphere 
covering all possible directions, and not just a half circle covering 
directions ranging from straight up to straight down. When covering an 
object with hairs, selecting from this half circle of sample hairs should be 
sufficient, and rotation would take care of the rest.

This doesn't take into account difference in length of hairs, but if your 
full sphere approach can be made to support that, then the half circle 
approach can too...

It's very possible I've misunderstood something. I'd be interested in an 
elaboration of your technique. :)

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Tim Nikias
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 23 Jan 2005 19:13:53
Message: <41f43dc1$1@news.povray.org>
Hi Rune!

No, you've understood it quite well. If the object/hair is unaffected by
gravity, then there would be no point in distributing several of them on the
sphere. Why am I not using a vertical alignment and go for the entire
sphere?

To be honest, my thoughts went a different route. I always try to maximize
flexibility. So, if I'd decide to create hair with an added (and fairly
easy/crude) simulation of wind, hairs at the back would have to bend
differently than hairs at the front. It's not like I can create
ultra-realistic and dense hair with this (as is obvious, I think, the hair,
after all, is simulated/modelled on a sphere, but gets placed across an
entire object...), but still, I always try to think in bigger scales, not
just for a current image, but for future purposes as well.

As for the lengths: they will be set in intervals, e.g. you set a minimum
and maximum length, an amount of steps, and the macros will create
[full-sphere-hairs]*[steps] and just pick from the different sets. Along
with the wind, I'd think that pre-parsing a few thousand hairs and being
able to reuse them across the entire scene is well worth the effort,
imagining that you'd parse as many hairs for a single object as well. I also
want to write the hair-sets to disc, so that you can run a simple file once
and save all the data, and the final scene will just have to parse the
picking and alignment. Maybe I'll implement output for that as well.

Additionally, the mapping technique (spherical to 2d-array) might be reused
for completely different algorithms which I am currently completely unaware
of. ;-)

I've also made a test. Using my Surcoat-Macros, I've sampled my "furry
fellow" (posted in p.b.i) with 30.000 points on the surface. If I create a
set based on a cubic-array with side-length of 14, I create 1094 hairs (I
only take the outside surface of the cube) and reuse them. That requires 74
MB peak memory for the final image. If I create 30.000 individual hairs, I
get 254MB peak memory. Add that the hairs used for both tests were rather
low-poly (I think around 60 triangles or so), and you can see where this is
getting... Also note that when I used only 74 hairs, I had 60 MB peak
memory, but some interpolation effects occur (hairs look like they're
layered, due to larger difference between angles, there are obvious gaps).
So with little more memory I got an image which looked like the 30.000
individual hair version, but used just about a third of the memory.

Once the hair-macro gets refined (currently there's only a 2d-strip, I want
to create conic hairs, and I want to script that simple wind), things will
look even better. I've yet got to figure a proper and easy way for some
varied texturing though.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Rune
Subject: Re: Normal-Interpolation (MPG1, 162kb)
Date: 24 Jan 2005 01:50:15
Message: <41f49aa7$1@news.povray.org>
Tim Nikias wrote:
> To be honest, my thoughts went a different route. I always try to
> maximize flexibility. So, if I'd decide to create hair with an added
> (and fairly easy/crude) simulation of wind, hairs at the back would
> have to bend differently than hairs at the front.

Ah, so wind is the reason to go for a full sphere rather than a 
half-circle...

But a half sphere should still be enough then... ;)

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.