RAT Shader Library


Table of Contents

Shaders Catering to Textures

Surface

Displacement

Lightsource

Shaders that Compute Maps

Shadows

Reflections

Environment Reflections

Shaders for Special Effects

ratCollector.slo

ratmosphere.slo

volumeSpot.slo 


Shaders Catering to Textures

The standard collection shaders contains several shaders which were created specifically to apply texture maps onto objects. One of the strengths of the RenderMan shading language is its proceduralism, but there are often cases where a texture map is the better solution. You'll want to familiarize yourself with these texture mapping shaders. Using these shaders, textures can be mapped to parameters such as color, opacity, specular, and more. Textures can be projected from lights, or used to map bump or displacement. 

Texture Mapping Surface Shader
Mondo.slo
Mondo is the shader to use to apply texture maps, as it allows textures to be quickly added to a whole list of different parameters.  (color, bump, glow, shininess, opacity, etc). This shader is provided in source code format (mondo.sli & mondo.sl) as an example of writing MTOR compliant shaders. 

top


Shaders Which Handle Computed Maps

When using the RenderMan Artist Tools it is essential to understand how to use computed maps to create shadows and reflections in scenes. Here's a list of the standard lightsource shaders which can be used in conjunction with *TOR's computed maps. These shaders can create shadow and reflection effects through faking the respective phenomena with computed maps. It is a good idea to become acquainted with the different shaders that can generate these effects. The tutorials have information on generating shadows and reflections. 

 

Shadow Mapping Appearances

Included in the RAT Shader Library:
atorSpot.slo, mtorSpotLight.slo, etc.

atorPoint.slo, mtorPointLight.slo, etc.

mtorDirectionalLight.slo, etc.


Included in the Standard RenderMan Toolkit:

shadowSpot.slo

shadowDistant.slo

shadowPoint.slo

Reflection Mapping Appearances

Included in the RAT Shader Library:
ratReflection.slo

Environment Mapping Appearances

Included in the RAT Shader Library:
ratEnvironment.slo

top


Special Effects Shaders

Special-purpose shaders play an important role in the toolbox of the RenderMan Artist. Special effects like volumetric lighting, layered textures and even ray tracing can be achieved with special-purpose shaders. Because these shaders are special-purpose they can often be uniquely tailored to your scene and provide precise control over the rendering costs. Some special-purpose shaders provide more nuts-and-bolts functionality.

Generating Shadow and Reflection Mattes - ratCollector.slo

This shader is really useful when integrating CGI with live action footage. You can cause computer-generated shadows and reflections to appear on matching objects in your plates by compositing resulting images over the backgrounds. Here's how this works. First you attach the ratCollector shader to a surface in your CG scene (often a floor) which matches your background image. Here, we assume that you don't have any CG objects which are to appear under or behind the CG floor. During rendering, ratCollector collects information from all lightsources about the shadows and reflections in your scene. ratCollector, then computes the appropriate surface color and opacity necessary to support the compositing of the final image over your plates.

In this first image, we see the results of rendering, prior to compositing over our background. I have set the ratCollector shader to have a 20 percent Opacity so that the shadows will simply darken the wood surface in the final composite. The shadow effect will be generated by merging the rendered shadow color, (in this case dark gray), over the final background. The shadow color can be specified in the shader, or determined from the participating light sources.

Looking at the next image, you can see how ratCollector works. This is a view of the alpha channel of the first image. Notice that the beverage can is fully opaque as expected. The shadows are only 20 percent opaque, as determined by my shader settings. You'll also see that the reflection has no alpha component. Color values in the image, without associated alpha values, are a signal to the compositing software to add these pixels over the background, rather than performing the normal merge over operation.

Compositing this image over a background, perhaps obtained from a live action sequence, produces a picture that appears to include both shadows and reflections on the background. Another benefit to this approach is that the color, reflection and shadow components are all contained in a single image file, making the final compositing less prone to error. By appropriately setting the lightsource shadow and reflection parameters, the rendering pass for both are automatically handled by *TOR.

top


Fog - ratmosphere.slo

This shader is an atmospheric shader that provides animating lumpy fog. It does not perform volumetric calculations and thus doesn't affect rendering times too drastically. In animation, the fog will change over time.

Here's an image from an unknown shower:

To obtain atmospheric effects follow these simple steps:

  1. Import an atmosphere shader into Slim.

  2. If you're using Slim name it world. This has the effect of making it the default atmosphere shader for your scene. Note that you can attach atmosphere shaders to individual objects, but this capability only has uses in unusual situations.

  3. Remember that fog will only show up in front of rendered surfaces. You may need to insert a wall or floor in order to get the effect you want.

top


Volumetric Lighting - volumeSpot.slo, volumeFog.slo

This combination of shaders can be used to create stunning imagery with volumetric lighting effects that can take quite a while to compute. This is due to the fact that shading calculations are performed throughout the volume encompassed by a spotlight. This is vastly more expensive than typical CG shading computations which only occur on the surfaces of visible objects.

Here's an example image:


image courtesy Annabella Serra, Copyright © 1996 Rainsound

To obtain volumetric lighting effects follow these simple steps:

  1. Create a spotlight in your scene

  2. Position, orient and set the cone angle using standard transform tools

  3. In Slim:

  4. Now render (perhaps it's lunch time?)

  5. Remember that fog will only show up in front of rendered surfaces. You may need to insert a wall or floor in order to get the effect you want.

top


 

Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.