Hair intersection : approaches ?

Practical and theoretical implementation discussion.
spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Hair intersection : approaches ?

Post by spectral » Tue Feb 11, 2014 11:52 am

Hi,

I'm currently looking for all the different approaches of "hair intersection".

So, if you have papers, documentation, reference or anything else... please drop me a line ;-)

Any council, comment, feedback is also welcomed....

BTW: I have to implement it on the GPU (I'm just afraid of analytic code ... that can be slow !!!)

Thx
Spectral
OMPF 2 global moderator

papaboo
Posts: 44
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: Hair intersection : approaches ?

Post by papaboo » Wed Feb 12, 2014 12:05 pm

There's the stochastic transparency approach to transparency.

http://www.nvidia.com/object/nvidia_res ... b_016.html

But if you're targeting real-time rendering I don't know if you want a random element in your renderer which could potentially produce artefacts in certain scenarios.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Hair intersection : approaches ?

Post by spectral » Wed Feb 12, 2014 1:30 pm

Thanks, but I don't care about shading... just intersections for now ;-)
Spectral
OMPF 2 global moderator

Chris Morris
Posts: 6
Joined: Sun Mar 18, 2012 5:25 am

Re: Hair intersection : approaches ?

Post by Chris Morris » Thu Feb 13, 2014 1:53 am

Very hard thing to do without cheating (biased tricks). I'd think you would have to evaluate the hairs at the node procedurally from a set of constraints and control points, rather than intersecting some kind of primitive soup. When your ray hits a constraint node, find the nearest set of control points that represent that chunk of hair and test against the set of splines created from the local control points and a procedural offset that define each individual hair.

Dade
Posts: 206
Joined: Fri Dec 02, 2011 8:00 am

Re: Hair intersection : approaches ?

Post by Dade » Thu Feb 13, 2014 10:09 am

Having another ray/primitive intersection, aside from ray/triangle, is particularly GPU-unfriendly. In LuxRender, we use a simple open standard file format to fast export/import (http://www.cemyuksel.com/research/hairmodels/) hair/strand information. It is also quite efficient in term of disk space. We than tessellate the hairs in triangles with few options available for the users (solid or ribbons, adaptive tessellation, resolution, etc.). It works quite well:
furball.jpg
furball.jpg (173.34 KiB) Viewed 8411 times
Indeed, the drawback is the memory required to store the large amount of triangles (and this is GPU unfriendly too).

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Hair intersection : approaches ?

Post by spectral » Thu Feb 13, 2014 10:19 am

Thanks Dade,

Yes I have see how you do in LuxRender, but it is not really of high quality if you zoom on the hairs... except if you tessalate a lot !

So, I'm looking at different approaches but also looking to directly compute the "curved mesh" ray intersection... by example, there is one paper "Ray tracing for curves primitives", but even this approach is not perfect !

But anyway all the approaches are interesting and it depends of the scene ;-)

BTW: Sure, the real challenge is to implement it efficiently on the GPU !!
Spectral
OMPF 2 global moderator

lion
Posts: 36
Joined: Wed Sep 12, 2012 2:35 pm

Re: Hair intersection : approaches ?

Post by lion » Thu Feb 13, 2014 11:05 am

What if combine both approaches?
  • Build BVH of tessalated hair.
  • Use triangles at big distance.
  • At small distance compute "curved mesh" ray intersection only if ray hits BVH leaf.
  • Possibly split "curved mesh" to smaller and simpler curves for each BVH leaf\group of leafs.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Hair intersection : approaches ?

Post by spectral » Thu Feb 13, 2014 11:22 am

Sure,

It is a way to setup the scene... even automatically. But, I'm not playing with LOD, simplification, etc... for now !

Just looking for some "ray - curve" intersection method ;-)

(Even for ribbons, faced planes, smooth cylinders etc...)

Thanks
Spectral
OMPF 2 global moderator


spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Hair intersection : approaches ?

Post by spectral » Thu Feb 13, 2014 2:05 pm

Thanks...

Also, looking for the following paper : "Real-Time Hair Modeling and Rendering using Ray Tracing on GPU: Introducing "Continual Cylinders" to represent hair"

If someone has a copy, he is welcome ;-)

Thanks
Spectral
OMPF 2 global moderator

Post Reply