Understanding the ICE Framework

 
 
 

Anatomy of an ICE Tree

The following illustration shows a typical ICE tree for a simple particle system.

A

Data flows "downstream" from left to right along connections from one node's output ports to the next node's input ports.

Each connection represents a data set. Some data sets have a single member, for example, NbPoints of a polygon mesh. Other data sets have multiple members, for example, PointPosition contains a 3D vector for each point in a geometric object.

Depending on the context of a connection, the data may be per component, per object, or node-bound. When component data is different, each member of the data set is handled independently. However, if you drive component data with one value, the same value is used for all components.

B

Nodes must be connected to the root ICETree node in order to be evaluated. The root ICETree node appears in the object's construction stack and can be renamed.

C

Execution flows sequentially from top to bottom along the input ports of the root node and other Execute nodes.

D

Nodes that are connected to the Emit node's Execute on Emit port are applied only to new points that are generated on the current frame. They are not applied to all particles on every frame.

E

Nodes that are connected to the root node are executed on every frame. You can control which data gets set on which elements by using If and Filter nodes in the upstream branches. The simulation framework resets every particle's force to 0 at the end of each frame, so forces must be reapplied every frame.

F

The Simulate Particles node does the following:

  • Calculates the point accelerations based on mass and force.

  • Updates the point velocities based on acceleration.

  • Updates the point positions based on velocity.

The Simulate Rigid Bodies node is similar to Simulate Particles, but it also allows points to collide and pile up. In addition to the above, it takes into account other attributes like orientation, angular velocity, shape, size, scale, elasticity, static friction, and dynamic friction.

The Simulate Particles node (but not the Simulated Rigid Bodies node) also sets the simulated frame fraction to 1. This prevents points from being resimulated by other Simulate Particles nodes in the same tree or in other trees on the same object.

You do not need to include a simulation node in your tree — if you prefer, you can set point positions directly.

ICE Trees and the Construction Stack

The root ICETree node appears in the object's construction stack. You can have multiple ICE trees on the same object, and they can be renamed. ICE trees are evaluated with other operators according to their position in the stack, and they can be moved by dragging and dropping.

When you create a simulated ICE tree, two new construction regions are created: Simulation and Post-Simulation. The ICE tree is added to the Simulation region. The only difference between a simulated ICE tree and a non-simulated one is its position in the stack. You can turn a simulated tree into a non-simulated one by moving it to another region, say the Modeling region, and you can turn a non-simulated tree into a simulated one by moving it to the Simulation region.

The Simulation Region

The difference between the Simulation region and other regions is that the Simulation region is incremental. That is, calculations are based on the previous frame rather than the results of the lower construction regions.

This is true not only for ICE trees, but for all operators in the Simulation region. For example, if you apply a non-ICE Twist deformation with a small Angle value in the Simulation region and play back the scene, the object becomes progressively more twisted without any keyframes or other animation being directly defined.

If the simulation environment is not active, operators in the Simulation region are skipped. When the construction stack is evaluated, the results of the top of the Animation region are passed directly to the Post-Simulation and Secondary Shape Modeling regions.

By default, the initial state of a simulation is the result of the regions below the Simulation region on the first frame that the simulation environment is active. While the simulation is active, the lower regions are not re-evaluated.

Because the first frame of the simulation is the initial state, if you are emitting particles in the Simulation region then they will appear on the next frame.

If you manually set an initial state, that state is stored and used when the simulation starts instead of the top of the Animation region.

If you accidentally created a Simulation region and you want the lower regions to be re-evaluated, you can select and delete the Simulation region marker from the construction operator stack. Both the Simulation and Post-Simulation region markers are removed if either one is deleted, but operators in these regions are not affected and can be moved to the desired regions afterward.

See The ICE Simulation Environment for more information about the simulation environment, and see Creating an Initial State for ICE Particle Simulations for more information about the initial state.

The Post-Simulation Region

You can use the Post-Simulation region for any operators that you want applied on top of the simulation, but that you don't want applied incrementally like in the Simulation region and that you don't want to use for defining shapes like in the Secondary Shape Modeling region. For example, you can use the Post-Simulation region to apply a lattice on top of a particle effect.

The Post-Simulation region is always evaluated, even when the simulation environment is not active.

Particles Outside the Simulation Region

You can emit particles outside of the Simulation region. For example, you can emit a number of particles in the Modeling region, and then optionally freeze the construction history.

Because other regions are not simulated, particles are not added to those that existed at the previous frame, but instead they are added to the result of the previous operators in the stack.

Outside of the Simulation region, you can select and move particles like any other type of geometry. However, operators below the Simulation region are not re-evaluated while the simulation environment is active. You must move to the first frame of the simulation environment (the default initial state) to see the effect of MoveComponent and other operators.

ICE Attributes

Attributes are at the heart of ICE. Attributes are data that is associated with scene elements. Attributes can be stored on objects or on components such as points, edges, polygons, and nodes (also known as polygon nodes or texture samples). Almost every ICE tree involves getting and setting attributes.

Some predefined attributes are inherent to elements in the scene, such as PointPosition, PointNormal, Weights, EdgeLength, PolygonArea, and so on. Some inherent attributes can be modified in ICE trees, including PointPosition and Weights. Other inherent attributes cannot be modified directly, including PointNormal, EdgeLength, and PolygonArea (although they will be affected by modifying other attributes such as PointPosition).

In addition to the inherent attributes, there are other predefined attributes including PointVelocity, Force, Mass, Size, and so on. They are dynamic, meaning that they do not exist until they have been set. Some nodes and compounds automatically set certain attributes, but otherwise it's up to you to set them. For example, the Add Point node sets ID, and the various Emit compounds that contain Add Point also set Age and other attributes, but those attributes are not set if you get a point cloud from the Get > Primitive menu. All dynamic attributes can be set, except for ID.

Some nodes and compounds recognize specific attributes by name. For example, the Simulate Particles node uses Force, Mass, and PointVelocity to update PointPosition.

In addition to predefined attributes, you can set custom dynamic attributes in your trees and use the data in any way that you want. In fact, some attributes used in the supplied compounds, such as AgeLimit and StateID, are not predefined but are actually custom attributes that are used in the compounds for specific purposes.

For more information, see Getting and Setting Data in ICE Trees.

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