Working with Maps in ICE Trees

 
 
 

You can work with both weight maps and texture maps in ICE trees. In addition, you can read and write UV texture coordinates.

Weight Maps in ICE

To work with weight maps in ICE, you connect to its properties and attributes located underneath the associated cluster. For example, to work with the weight values, you connect to "<object_name>.cls.<cluster_name>.<weightmap_name>.Weights".

You can read and write weights. When you get the value of a weight map's Weights at a location, the interpolated weight value is returned. The following subtree modulates particles' PointVelocity based on the weight at their EmitLocation.

To write values to a weight map, you set the Weights attribute at the points' positions. The following subtree uses a Turbulence node to set weights.

There are some principles that apply when getting and setting weight maps in ICE trees:

  • If an ICE tree gets weights but does not set them, then any paint strokes you make are applied below the read point in the stack so they are read by the tree.

  • If an ICE tree sets weights but does not get them, then any paint strokes you make are applied on top. This lets you use the ICE tree to generate a default map to use as a base for painting.

  • If an ICE tree both gets and sets weights, for example, if it smooths weights, then there are special rules. If the ICE tree is above the Modeling region in the construction stack, paint strokes always go below it and are read by the tree. If the tree is in the Modeling region, then new paint strokes go above it but you can detach and re-attach the weight map in the tree (for example, by removing the reference and then putting it back) to place it above them.

Using Weight Maps with First Valid

Many native Softimage parameters, such as the Amplitude of a Push operator, use a weight map if one is connected, and use a simple numeric slider value if there is no weight map. You can achieve the same result with a First Valid node as shown in the following illustration of a portion of a compound. If a weight map is connected, its value is multiplied by Amplitude and passed downstream. If no weight map is connected, Amplitude is passed directly downstream.

Texture Maps in ICE

To work with textures or other image maps in ICE trees, you need a texture map. A texture map is a property that associates an image clip with a set of UV texture coordinates. See Texture Maps [Scene Elements].

To work with the color values of a texture map, get the texture map at a location. The following subtree sets particles' color based on the value of the texture map on the emitter at their EmitLocation.

Texture UV Coordinates in ICE

To modify texture coordinates in ICE, simply get and set the UVs or UVWs attribute, located under the texture projection of the appropriate cluster.

Note that if you set texture UV coordinates in an ICE tree, the result is applied on top of any other operators that affect them. As a result, you cannot modify the texture UV coordinates in the texture editor, for instance — you need to freeze the texture UV coordinates (and the ICE tree) first.

Caching Images Used in ICE Trees

When images are used in ICE trees, it can be helpful to cache them. This speeds up read operations, particularly for complex formats like EXR or compressed TIFF.

To do this, use scripting or the SDK to set the FrameCaching property of the image source object. For example, in VBScript:

SetValue "Sources.noIcon_pic.FrameCaching", true

In JScript:

SetValue("Sources.noIcon_pic.FrameCaching", true, null);

For more information, see the [SDK Guide].

Note that activating this option does not affect the speed of texturing or rendering operations.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License