POV-Ray : Newsgroups : povray.unofficial.patches : More on hair Server Time
2 Sep 2024 00:18:08 EDT (-0400)
  More on hair (Message 11 to 20 of 25)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>
From: Matt Giwer
Subject: Re: More on hair
Date: 26 Nov 2000 20:00:16
Message: <3A21B220.4001A726@ij.net>
Paul Blaszczyk wrote:
> 
> Hi,
> 
> how we can make hairs in POV? Polygon model and extruding along a
> spline..other methods?
> How much memory it needs to extrude a circle along a spline?

	Can it be done in the sense of realistic? One hair vice a head of is
smaller than a pixel so it won't render unless close enough. 

	What are a hundred thousand hairs on a head that can't be seen?
Actually they could be seen and show up as a mass. Parsing time over the
edge of reality though. 

	So then we look at hair on TV and in movies and in fact in daily life
as we don't see individual hairs either for the most part. 

	One of my recent failures has been to imitate a 2D graphics trick. The
trick is a 3x300 (to pick a ratio), add noise and then scale it to
300x300. That is the PhotoShop "brushed aluminum" tutorial example. 

	Scaling bumps like that doesn't quite seem to work but then a hairy
sphere isn't quite right either. Reflection, specular combinations don't
seem to give the right impression. 

	The basics of hair appear to be highlights on a stretched pattern with
highlights but it has to be an interupted highlight so it is not like a
smooth surface highlight. 

	But after that, I can't see the least way to get even the simplest
hairstyles right from the hairdresser perfect out of it and then only
women's styles that cover the front hairline with bangs, even if I get
it working. 

-- 
It must be terrible to be bound by the past 
or in hopes of the future. 
	-- The Iron Webmaster, 169


Post a reply to this message

From: Warp
Subject: Re: More on hair
Date: 27 Nov 2000 03:21:10
Message: <3a221976@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: It certainly doesn't run on all computers...

  For some people PC is the only existing computer... ;)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: More on hair
Date: 27 Nov 2000 03:27:43
Message: <3A221BA5.7699F43C@pacbell.net>
Warp wrote:
> 
> Chris Huff <chr### [at] maccom> wrote:
> : It certainly doesn't run on all computers...
> 
>   For some people PC is the only existing computer... ;)

You mean to suggest that there is a truly viable alternative ?   ;~}

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Warp
Subject: Re: More on hair
Date: 27 Nov 2000 04:41:35
Message: <3a222c4e@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: You mean to suggest that there is a truly viable alternative ?   ;~}

  It depends on what you are doing.

  For home-use, PC has the best price/efficiency rate.
  However, in many places they don't use PCs but other computers (Sparc
servers, Alpha servers, Crays, SGIs...). For a reason.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Matt Giwer
Subject: Re: More on hair
Date: 28 Nov 2000 13:56:27
Message: <3A23FFD8.242D8B2D@ij.net>
"H. E. Day" wrote:
> 
> Pov Programmers!!
> You might want to check out this link:
> http://www.joealter.com/software.htm
> This system is based on z-buffer rendering, but I don't know if it could be
> appiled to Pov.  It does look very versitile.
> Also look at:
> http://www.joealter.com/shave/overview.htm
> Neat, huh?
> I want it!!!! :)

	Someone hit the wrong button and sent email rather than posted. They
may want to post it here. 

	A summary of the point made (pardon if not) was the Coca-Cola polar
bear was realistic modeling and massive computation. 

	Thinking about that I had a related problem on my truck in IRTC History
and in the Halloween competitions. Lines fell below the POV pixel limit
for the image size. I solved that by rendering a larger size and then
making it smaller in Photoshop. I presume increasing the sampling or
some trick in POV would have accomplished the same objective. 

	That may be a route to getting "correctly" modeled hair to look like
hair. It certainly took a lot longer that way. 

-- 
If you render too quickly you may miss some pixels.
	-- The Iron Webmaster, 256


Post a reply to this message

From: Peter Popov
Subject: Re: More on hair
Date: 28 Nov 2000 16:43:35
Message: <56l62t8avc6bmpn3dje6if3c6u3bhvem82@4ax.com>
On 27 Nov 2000 04:41:35 -0500, Warp <war### [at] tagpovrayorg> wrote:

>  For home-use, PC has the best price/efficiency rate.
>  However, in many places they don't use PCs but other computers (Sparc
>servers, Alpha servers, Crays, SGIs...). For a reason.

There must be a reason why only the secretaries at the Uni I go to use
PCs (and most of them are still on Netware). Try to convince an
industrial designer that AutoCAD is better than CATIA :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Peter J  Holzer
Subject: Re: More on hair
Date: 3 Dec 2000 14:02:04
Message: <slrn92l1n5.7l8.hjp-usenet@teal.h.hjp.at>
On Fri, 24 Nov 2000 20:37:44 -0500, Chris Huff wrote:
>> As for the memory hit, only one hair is in memory at a time, so      
>> there is no large memory hit.                                        

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.

>If done one at a time, you trade time for memory, since you have to
>recalculate the hairs for every pixel(storing enough hairs is obviously
>not feasible, even with sharing mesh data...).

I don't think that this is "clearly not feasible". A human has about
100,000 hairs on his head. I don't know about furry animals, but 1
million hairs seems about right to me. If we represent a hair as a
spline with a thickness, a pointer to the texture (many hairs will share
the same texture) and a bounding box, 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.

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


>It might be possible to partly compensate with some kind of bounding
>scheme, so only hairs that might be visible are tested, but it will
>still be a significant cost.

Yes, the bounding scheme is very important. Clearly you don't want to
test against 1 million hairs for every ray.

>A media-like rendering algorithm still seems to be the best option,

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.

	hp

-- 
   _  | Peter J. Holzer    | Es war nicht Gegenstand der Abstimmung zu

| |   | hjp### [at] wsracat      | Zahlen neu festzulegen.
__/   | http://www.hjp.at/ |	-- Johannes Schwenke <jby### [at] ginkode>


Post a reply to this message

From: Chris Huff
Subject: Re: More on hair
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

From: Peter J  Holzer
Subject: Re: More on hair
Date: 5 Dec 2000 16:02:45
Message: <slrn92qhtv.n8s.hjp-usenet@teal.h.hjp.at>
On Tue, 05 Dec 2000 05:41:52 -0500, Chris Huff wrote:
>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.

Hmm, that gives me an idea (together with "media-like"). You could
indeed just convert all those hairs into a density field. But I think
that such a density field would need really humongous amounts of memory
- many gigabytes even for moderate resolutions. Using an octree
representation might bring it back into the "feasible" range, though.

>> 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

The t value isn't necessary for all types of splines (e.g. Bezier
splines don't need it), but that's just hair splitting :-)

>> 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?!?

A PIII/500 MHz with 256 MB of RAM. Which is probably better than
average, but not in the "have to win the lottery to afford that" range.

I have had scenes which required about 700 MB of virtual memory. After
the parsing, the slowdown isn't that bad.

So 2 or 3 animals would probably be feasible on that machine.

>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,

Only those not contributing to the image, which shouldn't be that many
(about half of them).

>and avoid certain calculations that must be done for objects such as
>normals and perturbed normals,

I would skip these for a hair object, too (a hair is too thin to have an
interesting normal).

>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.

Note that I wrote "building on the same idea". The idea seems to be to
model indiviual hairs. If you find an efficient way to calculate the
effect of many hairs, it probably isn't the same idea any more.


>Less memory hungry, since it can keep only the needed hairs in memory,
>maybe cacheing them for later access if there is enough memory.

True.

>Also, an object based hair will require anti-aliasing and could lose a
>lot of detail in that process,

Anti-aliasing doesn't lose detail, it gains additional detail (or at
least accuracy).

	hp

-- 
   _  | Peter J. Holzer    | Es war nicht Gegenstand der Abstimmung zu

| |   | hjp### [at] wsracat      | Zahlen neu festzulegen.
__/   | http://www.hjp.at/ |	-- Johannes Schwenke <jby### [at] ginkode>


Post a reply to this message

From: Paul Blaszczyk
Subject: Re: More on hair
Date: 8 Dec 2000 01:18:16
Message: <3A307DB1.2ACDE33D@alpharay.de>
Hi,

"Peter J. Holzer" wrote:

> On Fri, 24 Nov 2000 20:37:44 -0500, Chris Huff wrote:
> I don't think that this is "clearly not feasible". A human has about
> 100,000 hairs on his head. I don't know about furry animals, but 1
> million hairs seems about right to me. If we represent a hair as a
> spline with a thickness, a pointer to the texture (many hairs will share
> the same texture) and a bounding box, 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.

180 MB uncompressed (!). Number values only you can compress with a factor
up 20 or higher...what about this idea??

And i've found a homepage with a hair-rendering technique using texels. It's
possible in POV to render texels?
Here the URL:
http://dspace.dial.pipex.com/adrian.skilling/texels/texels.html  (with C++
code)

Bye
 Paul


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>

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