Working with Colors in ICE

 
 
 

The nodes in the Color category are designed to work with colors and gradients in ICE trees.

Particle Color

The Color attribute of particles affects their display in the viewports. It does not necessarily affect their rendered color. Some shaders make use of the ICE Color attribute automatically, but in other cases you may need to use an attribute shader to get the Color attribute and plug it into the appropriate shader port (see Bringing ICE Data into the Render Tree with Attribute Shaders [ICE Particle Simulations]). The Color attribute does not affect the viewport color of points on polygon meshes or other types of geometry.

The Color Math Nodes

The Color category contains a couple of nodes designed to perform basic math operations with colors: Add Color. Subtract Color, and Multiply Color by Scalar. They operate on each channel independently. Unlike the ordinary math nodes, these nodes provide options for:

  • Alpha. You can include the alpha channel, or ignore it. When you ignore it, the output alpha is 1.0 (full opacity).

  • Clamp Mode. You can clamp values to the range [0.0, 1.0], or you can clamp them to non-negative values [0.0, infinity), or you can leave the results unclamped.

Working with Vertex Colors

You can read from and write to vertex colors (also known as color at vertices properties, or CAVs) in ICE trees. To do so, you connect to the Colors attribute of the vertex color property found under the appropriate cluster.

To read a CAV property, you get the Colors attribute at the desired location. For example, the following tree sets particles' initial color based on the value of a CAV property at their EmitLocation.

To write to a CAV property, you set the Colors attribute at the node position or location. For example, the following tree uses the node's X position to set the color based on a gradient.