Prev | Next


Reflections and Refractions


Ray Tracing Reflections & Refractions

Global Controls

Ray Tracing Features


Ray Tracing Reflections & Refractions

RenderMan's advanced ray-tracing sub-system allows the creation of physically correct reflections and refractions. RenderMan has special attributes available for controlling how rays behave for the creation of special effects like, blurry reflections, anti-aliasing, and bias. Below some of these controls will be explored. These controls work similarly for both reflections and refractions.


Global Controls

Ray Tracing must be enabled in the Features Tab of the Render Globals in order to ray trace reflections or refractions. Once ray tracing is enabled, the global controls for ray tracing are available. 


Ray Tracing Features

Adding RenderMan Controls
In general, RenderMan for Maya renders ray traced reflections using the same workflow as Maya. There are, however, some special ray tracing features for RenderMan which are not directly supported by Maya. You can add these controls to your Maya Materials as needed, which will allow you to take advantage of these effects. To add these controls to a Material open it in Maya's Attribute Editor, then go to the Attributes menu and select RenderMan-> Add Reflection Controls (or Refraction Controls). New ray tracing controls will appear under the Extra RenderMan Attributes.

Samples
By increasing the ray samples, we increase the amount of rays cast from any point. For some effects a sample of "1" may be sufficient. However, other times casting multi-sample allows for greater image quality (using multi-sampling for anti-aliasing) and special effects (like blurry reflections).  Higher samples will also dramatically add more time to rendering and should be increased with care.

Single sample

Multi-sampling


Blur
Both reflections and refractions can be blurred. Increasing the value of blur increases size of the ray's sample cone. This allows the creation of blurry reflections, refractions, subsurface scattering, etc. Blurring traces also requires a greater number of samples to be cast from any given point in order to reduce splotchy artifacts.  

In the images on the below, the number of samples has a large effect on the quality of the resulting image. In this case, twelve samples might not be enough for a high quality render, but twelve produces a much more acceptable effect than one single sample. 

1 Sample  "0.25" Blur

12 Samples   "0.25" Blur

1 Sample   "1.0" Blur

12 Samples   "1.0" Blur


Trace Sets
Trace sets provide a method to define which objects a particular shader will trace. Objects can be defined as trace sets (which are simple Maya sets with an added attribute). These sets can be referenced in shaders in the "Trace Set" parameter.

The visibility of objects to tracing can still be enabled and disabled on a global level (using Maya's Attribute Spread Sheet). The Trace Set brings an added level of control where objects can be visible to tracing on a per-shader basis.  

The effective use of trace sets can limit the total amount of ray tracing calculations which are performed in a scene, significantly reducing memory requirements.

Reflections without trace sets

The yellow and blue cylinder are added to a trace set called, "two_cylinders"
 

The reflection is limited to the trace set "two_cylinders" and rendered. 
Note neither the sky or the middle cylinder are included in the reflection.
 


Max Distance
The distance that rays travel from surfaces can be limited so that the rays are cast a fixed distance. This allows rays to sample only objects which are within a set  proximity, saving the added cost of probing a scene, hitting and dicing geometry, and running shaders of remote objects that have little bearing on the effect. Max distance is especially useful when used when indirect illumination, or other effects which require many blurry samples when occlusion culling of nearby objects is most important, and far away objects have less relevance.   

If a ray travels the entire max distance without hitting any objects, it expires; the ray misses. When a ray misses it returns the environment color.  


Prev | Next


 

 

Pixar Animation Studios
Copyright© Pixar. All rights reserved.
Pixar® and RenderMan® are registered trademarks of Pixar.
All other trademarks are the properties of their respective holders.