Scalar Multi Switch

| Render Tree Usage

Category: Switch

Shader Type: Texture

Output: Scalar value

The Scalar Multi Switch shader allows you to specify one of eight input scalar values based on an integer Switch. The eight inputs are named Case 0 to Case 7. You can set an integer Value and a scalar Input for each Case.

When Switch is equal to the Value of Case n, the Input of Case n is evaluated and flows downstream through the render tree. When Switch is equal to the Value of more than one Case, the first Case (in numerical order) to match gets evaluated. If Switch matches none of the Cases, then the Default parameter is evaluted instead.

All of the parameters can be animated or driven by another shader in the render tree.

Default

Sets the default scalar value to use when the Switch value does not match the Value of any of the Cases.

Switch

Accepts a varying set of integer values that control which Case’s Input gets evaluated.

Case 0 - 7

Value

Specify an integer value. When the Switch value matches this value, the Input for this Case is evaluated and output through the render tree.

Input

Sets the scalar value to use when the Switch value matches the Value for this Case.

Render Tree Usage

This render tree example illustrates how you could use the Scalar Multi Switch shader to change the density shape of an ICE particle cloud based on the particle State_ID attribute. In the ICE tree, the particle cloud is defined by two different states (behaviors) triggered by the age of the particles. Each state has a unique ID so that the particles in that state can be easily identified.

In the render tree, the Switch parameter is driven by an Attribute Integer shader that pulls the State ID attribute for the particles defined in the ICE tree. The Scalar Multi Switch shader is then used to drive the particle density shape using a different fractal scalar shader depending on which Case matches the current state of the particles.

 

For more information about shading ICE particle simulations, see Overview of ICE Particle Shaders [ICE].

For more information about working with ICE particle states, see ICE Particle States [ICE].



Autodesk Softimage v.7.5