ICE Particle Instances (Objects as Particle Shapes)

Substituting objects for particles allows you to use objects as part of a particle simulation. You can use any 3D geometric object in place of particles to create many different effects. For example, you could use party streamers as particles to make a parade scene, cars to create a flow of traffic around a traffic circle, or characters to create a crowd scene.

Instances are exact copies of their master object, including its materials (color). However, instances inherit the particle’s position, velocity, orientation, and size: the instance’s transformation is not used (although children keep their relative transformation). Remember that instances are not particles as far as rendering is concerned: instances get their rendering information from the master object.

 

If you want to use the particle color instead of the instanced geometry color for rendering, see Using the ICE Particle Color in the Render Tree.

If you’re using instances as particle shapes in collisions with an obstacle (if the particles are rigid bodies, or if you use a compound with surface interaction, such as Bounce Off Surface), an approximated bounding sphere is created around it: its actual shape is not used. If you need to have exact collisions, you may want to instead use particles as rigid bodies—see ICE Rigid Bodies for more information.

 

Creating Particle Instances

To use instances as particles, you can use a single object, a hierarchy of objects, or a group of objects and assign them to the point cloud using either the Set Instance Geometry compound or the Instance Shape node in the ICE Tree, depending on whether the instance geometry is animated or not. The point cloud’s Shape attribute is used to draw each particle in the point cloud as the referenced instance object or hierarchy.

• If the instanced objects are not animated, you should use the Instance Shape node. This node provides the simplest and fastest way to create large numbers of instances whose geometry is not animated. The Instance Shape node is actually used inside the Set Instance Geometry compound, but does not include certain parameters that the compound provides for using animated instance geometry. These parameters are unnecessary for unanimated instance geometry and actually increase their evaluation time, especially noticeable when you’re using a large number of instanced objects.

• If the instanced objects have their geometry animated (shape or deformation animation), you can create crowds or flocking scenes, such as with flying birds, butterflies, or walking characters. You can use the Set Instance Geometry and Control Instance Animation compounds to help you determine which frames of the animation are used and how they’re played during the particle simulation.

The Set Instance Geometry compound uses the ShapeInstanceTime attribute which implements the instances using stand-ins (assemblies) when rendering with mental ray. The stand-ins write the instanced geometry to disk and then load it for rendering. As a result, this may cause memory problems while rendering many, many animated particle instances (see mi Archives and Stand-Ins [ Rendering ] for more information).

The Instance Shape node or Set Instance Geometry compound assign each object in a group to a particle (based on its creation order that you can see in the explorer) and stays with that particle for its lifetime. This is because the instance is based on the unique ID of the particle.

To create particles using instanced geometry

1. Create an object, object hierarchy, or group of objects (press Ctrl+G) that you want to instance. This object can have its geometry animated or not.

2. Create a particle emission—see Creating ICE Particle Emissions.

3. In the ICE tree, open an Emit compound’s property editor and set up the particles as you like. Instances inherit the values you set for the particle’s Speed, Orientation, and Size.

The Size value is like a multiplier of the original instance’s geometry size: a value of 1 is the actual size of the instance geometry.

 

Because the instances inherit these particle attributes, you could use a Randomize compound (such as Randomize Value by Range) to add some variation to them.

See ICE Particle Size, ICE Particle Speed, and ICE Particle Orientation for more ideas on which compounds to use for adding variation to the instances.

4. Open the preset manager on the left side of the ICE Tree view.

5. Do either of the following:

- If you’re using unanimated instance geometry, select the Instance Shape node from the Data Access group on the Tools tab, and drag it into the graph area.

or

- If you’re using animated instance geometry, select the Set Instance Geometry compound from the Geometry Instancing group on the Task tab, and drag it into the graph area.

6. Open the Instance Shape node or Set Instance Geometry compound property editor and use the Explorer or Pick button to select the object you want to instance. This can be a single object, a parent object of a hierarchy, or a group of objects.

- If you selected a parent object, make sure to select Object+Children in the Hierarchy Mode list.

- If you selected an object or group, select Object from this list. See Using Groups of Instanced Objects for more information about using groups.

The point cloud’s Shape attribute is used to draw each particle in the point cloud as the referenced instance object or hierarchy.

7. Do either of the following, depending on which node you have selected:

- Plug the Instance Shape node into the Shape port of the Emit compound to have the instances used upon particle emission.

To have the instances evaluated at every frame, you can plug the Instance Shape node into the Shape port of the Set Particle Shape node, which must then be plugged into a port on the ICETree node.

 

or

- Plug the Set Instance Geometry compound’s Execute on Emit output into the Execute on Emit port of the Emit compound.

For information on controlling the instances’ animation, see Controlling the Instance’s Animation.

 

The instanced objects are displayed in the viewport when you play the simulation.

Tips for Optimizing Particle Instance Display

Here are several tips to help you make instance playback faster:

• If you are using complex geometry for the particle instance, or just many instances in a simulation, you can optimize the display by using other shapes to display them in the viewport.

To do this, select a shape, such as boxes or rectangles, from the Display As list in the point cloud’s Particle Display property editor (see Setting the Particle Display). The shape you select will be scaled according to the geometry’s bounding box.

• You can also create a lower-resolution and unanimated version of the instanced geometry as a stand-in (proxy) for more complex, animated instances. Then use an If node to switch between the stand-in and the real instance geometry when you want to use it.

• For better performance, textures are not displayed on individual instances in the viewport, but they will be rendered.

• If a volume shader is connected to the particles in the render tree (such as the Particle Volume Cloud shader), the instance shapes are ignored and the particle data is rendered using the volume shader.

• There are several types of display attributes to help you visualize the instances in the viewport if you’re working in wireframe mode or a using low-resolution version of the instance geometry. The Orientation and Point Velocity attribute types may be particularly useful to help you see how the instances are oriented and moving. See Creating Particle Display Attributes for more information.

Using Groups of Instanced Objects

If you’ve used a group of objects for the instances, you can pick out the instance object you want to display using the Group Object Index in the Set Instance Geometry property editor.

The objects in the group are picked according to their creation order, as shown in the explorer. You can use the View > General Sort > None (Creation) filter in the explorer to make this easy to see. For example, the first object created is 0 in the index, the second object is 1, and so on.

With the Creation filter on, you can then use the View > Reorder Tool in the explorer to change the objects’ order in the group.

 

You can keep adding objects to this group as you like—just remember to add the new object’s index number to the Out-of-Range Index value if it’s set to Clamp. Or switch this to Wraparound to automatically include any additions made to the group.

Adding to groups makes it easy to test out a few instance objects to see the effect, then add more as you like. You can also easily replace simple, stand-in (proxy) objects with the more complex ones when you’ve worked out the rest of the particle simulation’s movement and basic look.

If you want to randomly select objects from the Group Object Index, you can use a Randomize compound (such as Randomize Value by Range, as shown in the tree below). Plug its Value output into the Index port of the Instance Shape node or the Group Object Index port of the Set Instance Geometry compound, then set its value range, which is the index values of the objects you want to use.

 

 

Hiding Instance Masters

If you want to keep the master objects in the scene, but you don’t want to worry about them being displayed or rendered, you can hide them by selecting the Instance Master Hidden option in each master object’s Visibility property editor.

Controlling the Instances Animation

If the instanced objects are animated, you can create crowds or flocking scenes, such as with flying birds, butterflies, or walking characters. Any frame of the animation can be instantiated independently.

You can have animation offsets to be able to display each instance at a different frame of its animation during the particle simulation. If you’re doing a crowd, for example, each character can walk at different paces using the same walk cycle. This animation is displayed both in the viewport and in the rendered animation.

 

To controls the particle instances animation

1. Set up the particle instance object in the ICE tree as described above in Creating Particle Instances.

2. In the Set Instance Geometry property editor, select which frame of the instance’s animation you want to use as the starting frame for each particle. This means that all particles are emitted using the same frame of animation.

3. Click the Task > Particles tab in the preset manager on the left side of the ICE Tree.

4. Select the Control Instance Animation compound from the Geometry Instancing group, and drag it into the graph area. This compound is like a playback control for how you want the instance’s animation played during the particle simulation.

5. Plug this compound’s Execute output into a port on the ICE Tree node.

The tree below has a number of other compounds used to randomize the instance’s size and group index.

 

6. Open the Control Instance Animation property editor and set the Animation Start and End frames of the instance’s animation that you want to use in the particle simulation. For example, if the instance’s animation goes from frames 1 - 50, you can choose to use only frames 20 - 40 for its animation in the simulation.

- You can also set the Loop Method to Loop or Clamp (hold the last frame to the end) the animation after the last frame of this range is played.

If you set this to No Change, you don’t need to set the start and end frames because the animation is used as is. No Change simply plays the animation through, which is useful for long animation sequences that may match the simulation length.

- The Playback Speed Multiplier is useful for the No Change option. It lets you change the animation playback speed using a multiplier (a value of 1 is the instance’s original animation speed).

The ShapeInstanceTime Attribute

The ShapeInstanceTime attribute defines the “local” time of animated particle instances, in seconds. This is used to control the shape animation and sprite sequences on individual particle instances.

This attribute is used in the Set Instance Geometry, Set Particle Instance Animation Time, Control Instance Animation, and Control Displacement Instance Animation compounds, but you can also use it on its own in an ICE tree by specifying it in the Get Data and Set Data nodes, as described in Using ICE Particle Attributes.

The ShapeInstanceTime attribute implements instances using stand-ins (assemblies) when rendering with mental ray. The stand-ins write the instanced geometry to disk and then load it for rendering. As a result, this may cause memory problems while rendering many, many animated particle instances (see mi Archives and Stand-Ins [ Rendering ] for more information).

For more information on attributes in general and a list of all available ICE attributes, see ICE Attributes.

Scaling the Animation to Fit the Instances Size

Using the Control Displacement Instance Animation compound, you can scale the instanced object’s animation according to its size when it becomes instanced geometry. Instanced objects adopt the particle Size, so it may be different from what its real size is. As a result, the instanced object’s animation changes in accordance to the particle size.

For example, let’s say an object has a walk cycle on it: when this object becomes instanced geometry, it is smaller than its original size because the particle Size value is relatively smaller. To keep the same distance covered as the original animation, this object’s walk cycle must go at a faster rate as instanced geometry.

 

To scale the particle instances animation

1. Set up the particle instance object in the ICE tree as described above in Creating Particle Instances.

2. In the Set Instance Geometry property editor, select which frame of the instance’s animation you want to use as the starting frame for each particle. This means that all particles are emitted using the same frame of animation.

3. Click the Task > Particles tab in the preset manager on the left side of the ICE Tree.

4. Select the Control Displacement Instance Animation compound from the Geometry Instancing group, and drag it into the graph area.

5. Plug this compound’s Execute output into a port on the ICE Tree node.

 

6. Open the Control Displacement Instance Animation property editor and set the Start and End frames of the instance’s animation cycle that you want to use in the particle simulation.

Set the Distance Covered value, which is the number of Softimage units that the original instanced object travels in its animation cycle.

Tips for Animating Instances

• You can randomly select which frame of the instance’s animation is used as a starting frame for each particle by plugging in a Randomize Value by Range compound into the Input Frame Value port on the Set Instance Geometry compound. In the Randomize Value by Range property editor, select the range of animation from which a frame can be selected.

 

• You may also want to add some turbulence to the instance’s movement by using a Turbulize compound, such as Turbulize Velocity. Plug its Execute output into a port on the ICE Tree node.

• To keep particles aligned along a certain vector as they’re moving, use the Align on Velocity compound. Plug its Execute output into a port on the ICE Tree node. See Aligning Particles along a Velocity Vector for information.

• Try to keep the amount of animated instances to a smaller number because there can be issues when rendering them. See The ShapeInstanceTime Attribute for more information.

Displaying a Percentage of Instance Animation

Each instance’s local time is shown in viewport by default so that you can see the instance’s animation. However, for performance reasons, you can choose to display a lower percentage of the instance animation in the Particle Display property editor (see Setting the Particle Display).

Set the value for the Animation Detail % parameter in this property editor:

• A value of 0% does not evaluate each instance at different times, but the instance is still animated: it draws all instances at the same (current) frame. This makes playback faster.

• A value of 100% displays each instance at its local instance time (rounded to the nearest frame), which can slow things down.

• Any value between 0 and 100 is evaluated using a heuristic that tries to group instance animation times together to minimize evaluation, and tries to draw each instance at its closest time.



Autodesk Softimage v.7.5