Applying Shaders Using Overrides

An override lets you redefine certain parameters in a pass–partition, group, or hierarchy. For example, if a scene contains several hundred objects and you want to edit each object’s transparency value without reapplying a new material, you would create a pass partition that contains all the objects you want to modify, and define an override property linked to all of their materials’ transparency parameters. The override affects only the desired parameter(s) and leaves the other values untouched.

You can then control the transparency with an intensity shader or apply a texture to it to create a transparency map. By using the override, the texture only drives the transparency value and the remaining values (such as ambient and diffuse) remain intact. In addition, the original material—or other type of shader—applied to the object is not removed. This lets you control the specific shader connection of multiple materials with different render trees. See Overrides and the Render Tree.

Overrides are often used with render passes to get control over a specific parameter. When using the pass presets (such as highlight, caustic, and RGB Matte), overrides are used to isolate specific areas of your scene. When you create a pass you can customize it by singling-out any individual or group of parameters, whether they are shader-related (for example, transparency and specular values) or not (primary rays and geometric approximation settings).

 

Objects with a texture
(and diffuse, ambient, and specular values). Notice how the dinosaur has a texture with a bump map applied. If your client suddenly asks you to make all of the dinosaurs in your scene black, there is no need to start from scratch.

 

Override
Using an override you can modify specific parameters in an object’s material and/or texture. In this case, an override was applied to remove the ambient and diffuse values, leaving only the specular and the bump map.

 

No override
The same objects but without an override. Instead, a Constant Black surface shader was applied and the diffuse and ambient values. Notice how the texture has been overridden and the bump value lost.

Shader overrides are extremely useful if you want to add properties to an existing material. Using the example above (texturing a specular value), if you were to apply the texture directly to the partition (no override) it would replace any textures or materials assigned to your objects.

Overrides also make it easy to add a shader to several parameters at once. Again, using the above example, it would be relatively easy to add a texture to a single transparency parameter. But what if you had 315 objects, each one with a different material and different specular, refraction, and ambient settings? The override can locate every specular parameter for every object in a partition and apply on top — not instead — of its existing properties.

You can also use an override to control the property sets of several objects. For more information, see Overriding Properties [Scene Elements].

Creating an Override

Although overrides are usually created for a pass–partition, they can be created on groups, hierarchies, or locally per object. When applying an override on a partition, group or branch–selection, the override will search through all objects in the partition, group, or selection and search for the parameter to override.

For example, if you select a group and apply an override to the material.phong.reflection parameter, every material.phong.reflection parameter contained in the group will be modified. The same holds true for a branch–selection or selected partition. If you node-select an object, the override will not be propagated to any other object.

 

Using overrides can bypass the maximum and minimum values allowed for parameters. Setting a value outside the allowable range can cause unpredictable results.

To add an override

Once you have created a non-empty partition in a pass, you can select specific properties from one or several of its objects and add another property to them.

1. In the explorer, select the partition to which you want to add an override.

2. Choose Get > Property > Override from any toolbar.

The Override property editor opens and you can name the override. Don’t close the property editor yet.

Define the override

3. Click the Add Parameters button. A pop–up explorer appears listing each object in the partition.

Expand the object or light’s material node until you expose its sub-nodes.

4. Click any shader parameter’s name (diffuse, specular, etc.) to include it with your override property. Each parameter you select is highlighted in blue. Shift+click to select several parameters.

5. To close the window, click outside the explorer once you have selected the parameters. The Override property editor lists the parameters you have chosen.

In some cases, you may be prompted to choose whether to display the selected parameters with check boxes or connection icons. If this happens, refer to the next section Connection Icons vs. Check Boxes.

6. If you want to remove parameters from the override, click their names to mark them, and then click the Remove Marked Parameters button in the Override property editor.

Connection Icons vs. Check Boxes

When you add parameters to an override, you may be prompted to choose between displaying them with check boxes or connection icons. Check boxes allows you to toggle the parameters on and off, and connection icons let you connect the parameters to other shaders.

When this is the case, the following dialog box appears:

 

Overrides and the Render Tree

You can create powerful effects by expanding an override using the render tree. For example, you could create a 3D glow and connect its render tree to the Transparency parameter of all your 315 objects, giving them all a slightly ethereal glow without having to edit each object.

 

To expand an override

1. From an explorer, select the override by clicking its name.

2. Open the render tree to see the node representation of the override property. If nothing is visible in the render tree work area, click Update.

3. Add and edit shader nodes as you normally would in the render tree. For more information on working with the render tree, see The Render Tree [Material and Shader Basics].

 

For more information on how to use overrides with properties, see Overriding Properties [Scene Elements].

 



Autodesk Softimage v.7.5