Geometry

Geometry

images/geoSplash.png

The RIS mode of PRMan supports the full range of geometric primitives, including volumes, curves, subdivs, and blobby implicit surfaces. Object Instancing is fully supported, as well.


Choosing Primitives

The basic primitives each offer distinct benefits, but also present certain limitations or challenges. Choosing which primitives to work with when you have options in your pipeline can be difficult, but is simplified when you carefully weigh the pros and cons of each. The maxim "If you're gonna animate it, use subdivs; if you're gonna blow it up, use polies," may be an over-simplification, but it does speak to the aforementioned pros and cons.

Polygons are simple and individually "lightweight", but detailed models and curved surfaces will require oodles of polygons and can quickly become memory-intensive, particularly when ray tracing. Subdivision surfaces are very flexible - different "schemes" allow users to tailor their surfaces to the requirements of the topologies (e.g. "Loop" subdivs for triangular grids and "Catmull-Clark" for quads). Generally, it is easier to produce smooth, curved surfaces with subdivs, compared with polygons. Subdivs can, however, be more difficult to model - continuity of the surface is important, meshes should not have holes, and subdividing surfaces does have a cost in memory consumption. NURBS are a true curved surface and render very smooth, but they can be quite heavy.


Important Considerations

Shading Rate

In RIS mode, the ShadingRate will only have an effect on the tessellation rate; it will not impact the frequency at which shading occurs like it does in non-RIS mode, when it will impact both the frequency of shading and also the tessellation rate.

Overall, for both RIS mode and non-RIS mode, setting the ShadingRate to 1.0 should work well in most or nearly all cases. A ShadingRate of 1.0 will result in the scene being tessellated such that each micropolygon is about the size of a pixel, and this typically produces good photo-realistic results.

Occasionally, if there is very detailed and/or large displacement it can help to reduce the ShadingRate to, for example, 0.7 or 0.5 for the geometry that has the detailed/large displacement. Keep in mind that a ShadingRate of 0.7 will tessellate the scene such that each micropolygon is very roughly the size of half a pixel, and a ShadingRate of 0.5 will cause each micropolygon to be about the size of a quarter pixel, and the additional micropolygons will impact speed and memory performance.

Sometimes it is possible to get away with a larger ShadingRate of 2 or even 10, especially for particular geometry types, such as Curves. Keep in mind that a larger ShadingRate will result in a coarser tessellation, whereas a smaller ShadingRate will result in a finer tessellation.

Curves

In RIS mode, the behavior of round curves with Hair Widening enabled has changed. Now, all ray types including transmission use a stochastic test to determine whether a widened curve has been hit. This can result in a large performance improvement, particularly if the curves are widened or have an Os < 1 specified.

Roundcurves will also read the Os primvar if available, and combine this with the transparency computed via hair widening described above, before making a stochastic decision to hit or miss the curve. This is intended as an optimized fast-path to achieving semi-transparent hairs, since no shader execution is required and no continuation rays are generated.

Developers should consult Writing Bxdfs for important information about the special case of authoring a Bxdf for roundcurves.

Curve Dicing

Generally speaking, ray tracing curves, e.g. for hair, has been considered prohibitively expensive. Hairs are small, easy for rays to miss, but there are usually a lot of them, so they're going to consume lots of memory. Things get further complicated by the challenges of dicing. To help things along, PRMan provides several attributes that help ensure optimal curve dicing:

"hair" and "roundcurve"
Using these attributes in concert ensures high quality hair shadowing in any lighting configuration by intersecting against cylindrical hair geometry instead of flat ribbons, resulting in significantly more realistic occlusion.
"perservecv"
"Preserving" a curve's CVs guarantees an adequate dice rate for any curvature.

Examples

RPS 19 includes example RIB files and shaders demonstrating the capabilities of PRMan's RIS mode. These examples can be found in the /lib/examples/RIS/scenes directory of your RenderMan Pro Server installation. The page below offers an overview of curve rendering in RIS mode; if you're inclined to open up a terminal window, you can render along.

images/sheepCrop.png Sheep - The Noble Lamb! Mary had one, of course. This scene is a simple combination of some core features: PxrPathTracer is the integrator; five of the provided shaders are used - PxrMarschnerHair, PxrLMPlastic, PxrLMSubsurface, PxrLMDiffuse, and PxrLMGlass; the lamb's wool is a whole mess o' curves. Baa baa baa, indeed.

More Information

Additional information, including technical details, can be found on the pages below: