POV-Ray : Newsgroups : povray.unofficial.patches : More on hair : Re: More on hair Server Time
2 Sep 2024 02:13:31 EDT (-0400)
  Re: More on hair  
From: Chris Huff
Date: 5 Dec 2000 05:41:08
Message: <chrishuff-B90875.05415205122000@news.povray.org>
In article <slr### [at] tealhhjpat>, 
hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:

> I don't think you can have only one hair in memory at a time with
> povray. At the very least you must have all hairs which might intersect
> the current ray.

Of course you can...just generate each hair and then check for 
"intersection" instead of reading it from memory and testing it. Or 
generate each hair and add it's contribution into the total.


> that's 24*n+8+4+48 bytes per hair, if the spline has n control 
> points. Assuming 5 CP's to be enough for curvy hair, that's 180 
> bytes/hair or 180 MB for 1 million hairs.

That would be 32*n+...each control point has a vector(3 doubles) as well 
as a t value(another double). 1000000 hairs: 171.6MB


> A lot - but not unfeasible if you want to render a single animal (or
> even a small number of them).

Um, >170MB per animal for several animals as well as (possibly more 
hundreds of megabytes of) scenery? What computer are you using?!? Not 
many people are going to render empty shells of hair...though that might 
be interesting, especially with an explode include file and a poodle 
model. :-)


> Maybe. But if a media-like rendering algorithm builds on the same idea,
> I fail to see how it can possibly be much faster or less memory-hungry.

Faster...because it can skip calculating many hairs, and avoid certain 
calculations that must be done for objects such as normals and perturbed 
normals, calculating the effect of many hairs that are too small to be 
seen individually because they would only cover a small fraction of a 
pixel. Less memory hungry, since it can keep only the needed hairs in 
memory, maybe cacheing them for later access if there is enough memory.
Also, an object based hair will require anti-aliasing and could lose a 
lot of detail in that process, hair with a media-like algorithm wouldn't 
necessarily have this problem. Also, it has a chance of running on my 
machines without going to virtual memory for most of the scene.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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