Re: Hair intersection : approaches ? back
Board:
Home
Board index
Raytracing
General Development
(L) [2014/02/13] [tby Dade] [Re: Hair intersection : approaches ?] Wayback!Blender Cycles has native support for hair/strand primitives (but it works more or less only on the CPU, not with CUDA).
(L) [2014/02/13] [tby Dietger] [Re: Hair intersection : approaches ?] Wayback!>> Dade wrote:Having another ray/primitive intersection, aside from ray/triangle, is particularly GPU-unfriendly.
I am curios to know why you think this is much worse on the GPU then CPU. Do you have any experience trying this?
I admit to never have tried it myself, but my gut feeling is that it can't be that bad. I agree that merging triangle and curve primitives into one acceleration structure is probably not all that GPU friendly due to divergence and the overall more complicated traversal code. But when storing the two primitive types in separate hierarchies and traversing both one after the other, first triangles and then curves, I would expect things to be not all that bad. If the scene contains no hairs or most rays miss the hair all together, there is only the small overhead of traversing the very top of the curve hierarchy, so no real harm done. If the scene contains a lot of hair the extra ray-curve traversal and intersection cost will reduce performance, but that is to be expected as the scene complexity just went up massively. Also, by first tracing against the triangles the remaining ray segment is cut down and only curves that are likely to be the closest hit are tested. It might be more expensive then tessellation, but I would expect that the memory savings and increased quality would warrant the (limited) performance cost. But maybe I am wrong [SMILEY :D]
Dietger
(L) [2014/02/13] [tby lion] [Re: Hair intersection : approaches ?] Wayback![LINK https://www.shadertoy.com/view/ldsGWB]
Here example of complex "not triangle" intersection test.
(L) [2014/02/14] [tby spectral] [Re: Hair intersection : approaches ?] Wayback!>> lion wrote:https://www.shadertoy.com/view/ldsGWB
Here example of complex "not triangle" intersection test.
Sure, it is nice and impressive...
I have also think to use distance functions ([LINK https://www.shadertoy.com/view/XsfGWN]), but the problem is that it require an accurate grid settings... it is not really fine for production stuffs...
(L) [2014/02/14] [ost
by spectral] [Re: Hair intersection : approaches ?] Wayback!>> lion wrote:[LINK https://www.shadertoy.com/view/ldsGWB]
Here example of complex "not triangle" intersection test.
Sure, it is nice and impressive...
I have also think to use distance functions ([LINK https://www.shadertoy.com/view/XsfGWN]), but the problem is that it require an accurate grid settings... it is not really fine for production stuffs...
(L) [2014/02/14] [tby darkhorse64] [Re: Hair intersection : approaches ?] Wayback!I suggest that you look at RAY TRACING FOR CURVES PRIMITIVE from Koji Nakamaru & Yoshio Ohno. It comes with detailed pseudo code. I implemented their algoritm into my own renderer and it does the job.
You could also take a look at [LINK https://github.com/embree/embree the Embree renderer]. Intel folks are currently implementing hair rendering.
(L) [2014/03/10] [tby bachi] [Re: Hair intersection : approaches ?] Wayback!Here are two recent papers on hair rendering, both of them can be implemented on GPU
[LINK http://fileadmin.cs.lth.se/graphics/research/papers/2012/hairy/]
[LINK http://kunzhou.net/2013/fur-rendering-tvcg.pdf]
Both of them intersect the hairs with an aggregate of rays(the former use line and the latter use cone) instead of the traditional point sampling, in order to increase sampling efficiency.  And I think this would be an interesting line of research.
(L) [2014/03/10] [tby spectral] [Re: Hair intersection : approaches ?] Wayback!Thanks,
I know the Kunzhou work... but not the other one, will read it asap [SMILEY ;-)]
back