Curve Rendering

Hey,

How would you go about curve rendering in Optix? Has anyone set it up? I saw a slide in one of the presentations that mentioned it.

It sounds like another set of attribute and indices buffers, and a bounding box and intersection program. It sounds generally the same as a triangle mesh, and the aabb is easy enough for a line segment, but the actual intersection is more tricky for me.

Is capsule/cylindrical intersection the way to go? Camera facing ribbons of some kind? Ideally I’m looking for the highest performance option for use in hair preview renders.

Thanks,

-Colin

Hi Colin,

Your guess is correct. Using OptiX, you can setup your own bounding box and intersection programs to render curves. There are many different approaches you can take, and which one you choose depends on your needs.

You can pre-tessellate curves, which is fast to render but uses a lot of memory. At the other extreme, you can write an implicit curve intersector that is either iterative or recursive. That will use very little memory (you only need to have your control points in a buffer) but comes with some math complexity and divergence issues. Subdividing into cylindrical segments or using camera facing ribbons is somewhere in between those two approaches. The main concern with camera facing ribbons is making sure they work the way you want for shadows & reflections; you may want the intersector to always be ray-facing rather that camera-facing so the curve always appears to occupy the same volume from any angle.

You might be interested in this paper, which includes some of the CUDA code for the intersection program of a cubic Bezier curve with a circular profile and varying radius:

https://www.researchgate.net/publication/326234561_Phantom_Ray-Hair_Intersector


David.