Building Realtime Shader Trees

Realtime shaders are designed to take full advantage of the render tree. Although you can connect a realtime shader to an object’s material node from the Render toolbar or from within the material manager, the render tree is the only place where you can connect realtime shaders to one another.

In the render tree, realtime shaders are easily identifiable by their unique node color and input/output color.

 

When you connect realtime shaders, the order in which they’re connected defines the order of execution. In the example below, the OGL Shade node sets up a fixed function shading pipeline, while the OGL Draw node draws the object in the 3D view. If you invert the order, then the object would be drawn before it was shaded, leading to a different, and most likely undesired result.

 

In many cases the Draw nodes should be the first connected to an object’s material node because they are responsible for drawing the realtime effects created by the shade trees that feed into them. However, many of Softimage’s programmable shaders are designed using a unified shader model and have their “drawing” operations integrated within a single shader node. For more information, see Drawing Objects with OpenGL Realtime Shaders and Drawing Objects with DirectX Realtime Shaders.

In most ways, realtime shaders look and behave like mental ray shaders in the render tree. However, there are some important differences that you should keep in mind when building realtime shader trees:

• Realtime shaders cannot be connected to Softimage’s mental ray shaders.

• Realtime shaders can be connected only to other realtime shaders.

• The material node’s RealTime input is the only input that can accept realtime shader connections. Realtime shader effects that you create in the render tree are applied to objects through this input.

 

• Most realtime shaders have very few inputs. Each one has a previous input that accepts a connection from the preceding realtime shader. Those shaders that define textures can also accept connections from image clip nodes.

• Realtime shaders also support animation, scripting, expressions, and parameter linking.

• You cannot replace realtime shaders by dragging new shaders from a browser and dropping them on existing shaders in the render tree.

• You cannot preview realtime shaders the way that you do mental ray shaders. You must activate a realtime display mode.



Autodesk Softimage v.7.5