questions about hair rendering back

Board: Home Board index Raytracing General Development

(L) [2014/08/21] [tby MohamedSakr] [questions about hair rendering] Wayback!

I want to implement hair rendering, but don't know where to start from
if there are some good papers about this topic this would be appreciated
some questions though:
1- which is better(storing hairs as splines or as triangles) "for memory usage and speed, how it may suit GPU"
2- how it would be integrated in SBVH
3- a fast and method to estimate direct illumination on hair "if there is 1 for indirect this would be appreciated also [SMILEY :)] "
(L) [2014/08/21] [tby joulsoun] [questions about hair rendering] Wayback!

Kind of on this topic, I remembered this poster from Siggraph 2012 about very efficient sampling of hair. Not exactly your fit, but a very interesting read nonetheless!
[LINK http://research.lighttransport.com/distance-aware-ray-tracing-for-curves/asset/abstract.pdf]
(L) [2014/08/22] [tby papaboo] [questions about hair rendering] Wayback!

Disclaimer: I haven't read any of the source code or played around with it, so I don't know how well it works. But!
I would take a look at Embree. A lot of their 2.x.y relaese notes are concerned with hair, so clearly the guys have invested time in solving this issue. You might need to tweak their solution a bit in order to fit it onto a GPU, but Embree is written for SIMD architectures, so I'm guessing it shouldn't be too much of an effort.
(L) [2014/08/22] [tby sriravic] [questions about hair rendering] Wayback!

Hi
With regards to hair rendering, using curves directly over tessellation has its own advantages and disadvantages.
1. Reduced memory consumption. Typically curves are modelled as splines or bezier curves which are just a bunch of control vertices. Hence we use very less memory compared to tessellating the curves and storing per triangle vertices. The savings can actually be very very large if the tessellation rates are very high (used to accurately represent curves with triangles). Using the curve form naturally provides high quality curves and hair quality is determined only by ray sampling rate and not tessellation rate.
2. On the flip side, ray curve intersection tests are costly compared to triangle tests. You can look at the recent implementation we did with appleseed renderer ([LINK https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/foundation/math/beziercurve.h]) which supports degree 1,2,3 bezier curves as of now.
3. Using SBVH with curves directly is a bit tricky though. If you were to tessellate the curves, then its straightforward to feed the resulting triangles into the SBVH tree. No changes are required. But the tree can become very large due to a large number of triangles (once again memory issues). But using curves directly within a bvh (not sbvh) is straight forward as you use individual curves for primitives and their BVHs. But defining a spatial split with curves would be tricky I guess (we've already added bvh support for curves in appleseed and it works very good I guess). We are yet to understand how SBVH would fit with curves. Another issue is that when using curves, you end up having two different hierarchies to traverse (one for triangles and one for curves). This is another issue that has to be solved (there is a good paper from Intel in this year's HPG that talks about how to construct better BVH for hair using hair similarity) which is integrated in embree. Sadly the code available is only for Xeon Phi architecture and not for CPUs.
4. For illumination which should be fast I guess Kay-Kajiya model should work fine. But the industry standard is the Marschener model I guess. I'll have to look further into it I suppose.
Cheers.
(L) [2014/08/22] [tby MohamedSakr] [questions about hair rendering] Wayback!

@joulson thanks for the link, I took a look and it looks sweet  [SMILEY :)]
@papaboo I remember that embree has good hair tracing algorithm, but I forgot why I didn't use it, after reading sriravic reply I remembered now "because it is only for written for Xeon Phi"
@sriravic thanks a lot for the reply and the link, I'm interested to know the factor of computation of "ray-curve vs ray-triangle intersections"
also did you try other accelaration structures? "like OcTree?"
(L) [2014/08/24] [tby manycores] [questions about hair rendering] Wayback!

The hair geometry traversal/intersection code in Embree is written for *both* standard CPUs (SSE/AVX/AVX2) and Xeon Phi [SMILEY ;)]

back