About Shader Nodes

The first time you open the render tree, it may be a little daunting. There are a lot of nodes and thousands of possible connections with more shaders than you know what to do with!

The trick to keeping focused is knowing what shader goes where and what it does. While there are no hard and fast rules, knowing what can be plugged into the Material node is a great start.

The Material Node

The Material node acts like a container for all of the possible shaders that can be applied to an object. Every object has a material node: without it, an object wouldn’t render. Shaders can alter an object by invoking one or several of nine shader input types: Surface, Volume, Environment, Contour, Displacement, Shadow, Photon, Photon Volume, and Bump Map. See Shader Basics for a description of the available shader types.

 

Input Type

Function

Surface

Determines the basic color of an object as well as the casting of reflected, refracted, and transparency rays. These usually use texture shaders to further define a material. For more information on surface shaders, see Materials and Surface Shaders.

Volume

Modifies rays as they pass through an object or the scene as a whole. It can simulate effects such as clouds, smoke, and fire.

Environment

Used instead of surface shaders when an eye ray leaves the scene entirely. It defines what is seen in the background or infinity.

Contour

Used to add contour effects to objects’ edges, such as a cartoon effect shader.

Displacement

Alters an object’s surface by displacing its points; the resulting bumps are visibly raised and can cast shadows. Displacement is only visible in a rendering.

Shadow

Determines how the light coming from a light source is altered when it is obstructed by an object. It is used to define the way an object’s shadow is cast, such as its opacity and color.

Photon

Used for global illumination and caustic effects. Without this connection, an object could not receive or transmit photons.

Photon Volume

Used to define a volume for a photon effect.

Bump Map

Determines how and where an object will display a bump map on its surface.

Lightmap

Accepts connections from Lightmap shaders, which are used to sample object surfaces.

RealTime

Accepts connections from realtime shaders. All other realtime rendered object attributes are set and adjusted in the realtime shader tree that connects to this port.

Material

Accepts connections from material phenomena. Material phenomena are predefined combinations of shaders packaged as single nodes. For example, the Fast Subsurface Scattering shader is a material phenomenon.

Note: Connecting a phenomenon to this input disables connections to all other material node inputs.

Shader Node Colors

Every node that appears in the render tree is color coded, as are each of its ports. The color coding helps you identify which shaders are doing what their render trees, and clearly displays how and where ports and nodes can be connected.

As a render tree structure grows in size and complexity, color coding is very useful to locate a specific node at a glance.

Here is the node color code:

 

Material node

 

Material phenomenon

 

Surface shader

 

Texture shader

 

Lightmap shader

 

Environment shader

 

Realtime shader

 

Volume Shader

 

Output shader

 

Lens shader/camera node

 

Light shader/node

 

 

Shader Input and Output Ports

Every port (parameter) of every shader is color coded. A node’s output ports are indicated by connection points (colored dots) on the right side of the node, and its input ports are indicated by connection points on the left side of the node. The color identifies what type of input the port will accept.

The following table describes the type of data each input or output port uses:

Color

Input/Output

Result

 

Color

Returns or outputs a color (RGB) value. These input/outputs are most often used in conjunction with the surface of an object or when defining a light or camera.

 

Scalar

Represents a scalar input/output with any value between 0 and 1.

 

Vector

Represents an output/input that corresponds to vector positions or coordinates.

• As an output, returns a specific vector position.

• As an input, it is required to map a texture, for example, to a specific location.

 

Boolean

Represents an input/output that corresponds to a 0 or 1, or On/ Off.

 

Integer

Consists of a single integer (such as 2, 73, or 300).

 

Texture/Image Clip

Accepts or returns an image file.

 

RealTime

Accepts connections from other realtime shaders and outputs to other realtime shaders or to the material node’s realtime port.

 

Lightmap

Outputs the result of a lightmap shader to the Material node’s Lightmap port.

 

Material Phenomenon

Outputs the result of a material phenomenon shader to the Material node’s Material port.

Ports for Parameters: The Ins and Outs

In the render tree, every shader node lists its parameters as ports. You connect shaders by plugging one node’s output port into another node’s input port, each of which represents a parameter.

 

Some shader nodes have multiple output ports (also known as multi-output nodes). These nodes can extend the power of the render tree significantly, because the information calculated by the shader can be extracted to multiple data channels, and each channel can be used separately (with its own data type), instead of being combined into a single output. Multi-output nodes can serve several functions, such as the Particle Density shader that outputs both color and density at the same time to define the volume of a point cloud, or the RGBA Split shader that splits a texture’s colors and alpha into separate outputs to be used elsewhere in the render tree, and so forth.

 

As long as one node’s output type matches the input type of the destination port, you can connect the two nodes. What happens depends on the value of the outputting node, the setting of the inputting node, and, of course, where you’re connecting the node. For more information on how to connect shaders using the render tree, see Connecting Shader Nodes.

Port Groups

When a shader has a large number of parameters, their ports are grouped in the shader’s render tree node. This is also true of texture layers that you add to a given node, each of which belongs to is own port group.

 

For information about collapsing and expanding port groups and texture layers, see Collapsing and Expanding Port Groups and Texture Layers.

For more information about connecting nodes to parameters in groups, see Connecting to Collapsed Nodes, Port Groups, and Texture Layers.

For more information about texture layers in the render tree, see Working with Texture Layers in the Render Tree [Texturing].



Autodesk Softimage v.7.5