Introduction - Delux |
|||||||||||||||||||||||||
Pixar's RenderMan supports a variety of ray tracing calls and operations. The
Delux Shading Model allows you to assemble many different shading components
together. Because Delux is so versatile, the most straightforward way to add
raytracing to a shader is just to build it into a Delux Shading Model.
Understanding how to ray trace with Delux will help you understand how Delux can
be used to create all sorts of shading models. |
|||||||||||||||||||||||||
In this LessonWe'll take a look at Delux.
We'll use Delux to create ray-traced effects like: reflections, refractions, subsurface
scattering, and indirect illumination. |
|||||||||||||||||||||||||
Ray Tracing with Delux 1 - Open the Maya Scene |
|||||||||||||||||||||||||
For this tutorial, open the scene: |
|
||||||||||||||||||||||||
2 - Enable Ray Tracing |
|||||||||||||||||||||||||
Before we start ray tracing, we must enable ray tracing in MTOR. Open the Rays tab in the RenderMan Globals and "Enable Ray Tracing" via the checkbox. By default ray tracing is disabled. |
|
||||||||||||||||||||||||
3 - Ray Tracing General Controls |
|||||||||||||||||||||||||
The General Attributes tab of the RenderMan Globals contains several controls which affect reflections, these can be overridden on a per Ensemble basis. The defaults are fine, but here's a glossy overview: Max Specular Depth -
Limits how many times reflections bounce. When inter-reflections are required,
this can be increased. Otherwise a lower value, like 2, is fine.
|
|
||||||||||||||||||||||||
4 - Delux |
|||||||||||||||||||||||||
Next, in Slim, create an Ensemble and connect a Delux shading model to the Surface. Attach the Delux Ensemble to the sphere and render. You should see something similar to the image on the right. It's worth noting that Delux provides the ability to perform all kinds of shading model operations, but only performs ray tracing calculations if they are explicitly built into Delux.
|
The Scene Rendered |
||||||||||||||||||||||||
5 - Delux: Adding a Reflection Component |
|||||||||||||||||||||||||
The Delux shading model lets you build your own custom shading model with only
those elements that you need, diffuse and/or specular and/or reflections, etc.
These different elements that can be assembled together are called Shading
Components.
Delux contains a diffuse component by default. To create ray traced reflections, we'll add a reflection component. A) First look at the image of Delux on the right. Click on the big "+" (plus sign) next to the "Shading Components" entry. A new component, "V2", appears. B) Next click on the orange button next to the "B" in the image at right. A pull-down menu will appear. Select Reflection from the list. Use the triangle next to the "V2" to toggle your menu open and closed. Congratulations. You've added a reflection component to the Delux. Woot!
|
![]() |
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Reflection Strength Now render the scene. You should see something like the image on the right. Now the Delux shading model has both a diffuse and reflection component. Note the intensity for both values is "1".
|
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Increase Reflection Fidelity In the image above, the reflection looks alright. Occasionally ray-traced reflections appear "jagged", with blocky artifacts. By casting more samples we add more sampling to the reflection, effectively anti-aliasing the effect. In such a case the samples could be increased to a value like "6". Higher samples increase detail as well as render times. For more info on multi-sampling for anti-aliasing effects see: Multi-sampling.
|
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Blurry Reflections Reflections can be blurred and multi-sampled. Next change the reflection Blur to "1" and change the reflection Samples to "6". Render. The result will be much smoother. Remember, when blurring, higher samples are required to avoid dotty artifacts. For more info about blurring and multi-sampling see: Multi-sampling. |
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Parameter Tweaking When a new shading component is created its default values will need to be adjusted depending on the kind of material you want to create. A diffuse and reflection intensity of "1" is too much. Set the reflection intensity to "0.5" and diffuse intensity to "0.25". Note: before going on the next step, set the Reflection Samples to "1" and the Blur to "0". Things will render faster this way.
|
|
||||||||||||||||||||||||
6 - Delux: Adding a Specular Component |
|||||||||||||||||||||||||
Specular Component Specular highlights are an important element of shiny, reflective, surfaces. We can add a specular highlight to this Delux shading model just like we added the reflections. First, add a new shading component. Do this as outlined above. A) Create a new Shading Component by clicking the "+" B) Click the orange component button and select "Specular". Now render the swatch and behold the specular highlight.
|
|
||||||||||||||||||||||||
6 - Delux: Adding a Refraction Component |
|||||||||||||||||||||||||
Create Refractions
We currently have a nice shiny surface, but let's say we'd like to make a glass object. We can add a refraction node to do that. A refraction node is added in the same manner as the other shading components. A) Create a new Shading Component by clicking the "+". B) Click the Orange component button and select "Refractions". After creating the Refraction component, set its intensity to "0.75" and the Reflection intensity to "0.25" to get a more realistic effect.
|
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Now render. You should get something similar to the image on the right. |
![]() Refractions ~ Max Specular Depth "2" Default Index of Refraction: "1.5" |
||||||||||||||||||||||||
Index of Refraction
The index of refraction determines how much an object will bend light. The default is "1.5", which will bend the light quite a bit. The value of the index of refraction for some common objects is listed below.
|
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Blur Refractions Refractions can be blurred just like reflections. Set the index of refraction to "1.5", the refraction Blur to "1", and the refraction Samples to "6". Render. |
|
||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Reflections & Refractions That's how reflections and refractions work with the Delux Shading Model. When creating these effects pay attention to the surface normals of the object and make sure they are pointing in the correct direction.
|
|||||||||||||||||||||||||
9 - Conclusion |
|||||||||||||||||||||||||
Delux is a shading model that allows you to construct a custom collection of
surface attributes. Using Delux it becomes easy to add ray-traced effects to a shader. As you become familiar with the ray
tracing concepts you'll see that many of these effects can be created in other
ways.
A familiarity with the MTOR Ray Tracing documentation is a good place to continue from here: RenderMan Artist Tools- Ray Tracing Also See: |
|||||||||||||||||||||||||
|
Pixar Animation Studios
|