ICE Simulation Subframe Sampling
 
 
 

With certain types of ICE simulations, you may need to sample each frame more than once, as is usually done. These are the most typical simulation situations in which you need to increase the subframe sampling:

Subframe sampling determines how many times an ICE simulation is evaluated per frame. Increasing the subframe samples can help make the simulation solving more accurate. For example, with a fast-moving particle emitter, subframe sampling gives more accurate data on the particle's position. Of course, the payment for increased subframe samples is increased simulation time, so you need to balance the results of the effect that you need to achieve versus the time that it requires.

To upgrade scenes and/or compounds that were created prior to Softimage 2012 to be able to use subframe sampling, see Updating Scenes and Compounds to Use Subframe Sampling below.

In the image below, the Subframe Sampling value is 30. The particles are properly emitted along the sphere emitter's path. The sphere travels very quickly in a nonlinear path over 8 frames. Other particles are emitted upon collision.

In the image below, the Subframe Sampling value is 1. You can see that the sphere emits particles once at each frame, resulting in a very different look. The movement over each frame is so quick that the collision doesn't have time to be calculated.

Note

Subframe sampling is not currently supported for the Simulate Rigid Bodies node or non-ICE simulations (such as rigid bodies, soft body, cloth, and non-ICE Syflex Cloth).

Setting the Number of Subframes for a Simulation

Subframe sampling is done via the Simulation Settings property that automatically gets created when you create a simulated ICE tree for an object. This property is set on a per-object basis because the whole object must use the same subframe sampling to get predictable results. This property is connected to a port on the EvolveOp operator for the ICETree node. The EvolveOp reads the results of all the operators in the Simulation region and keeps the previous evaluation in memory.

You cannot currently adaptively change the number of subframe samples used for the simulation, such as increasing them only when there are collisions or during a particle emission. Only constant subframe sampling for the simulation is supported.

  1. Create an ICE simulation (particles, deformations, Lagoa, or Syflex ICE cloth/curve).

  2. From an explorer, click the node for the Simulation Settings property directly under the simulated object.

  3. In the Simulation Settings property editor, set the Subframe Sampling value to be the number of times per frame that you want the simulation to be sampled. For example, if you set this to 10, each simulation frame is sampled 10 times.

    Start out with lower values, such as 2 or 3, testing the results as you go. It's best to use the lowest value possible that produces the results you want. For example, with Syflex ICE simulations you may need only a maximum of 4 or 5, or 10 as a maximum for Lagoa simulations, or 20 - 30 as maximum values for extremely fast-moving ICE particle emitters or deforming objects.

Displaying Subframe Sample Data

You can visualize the Subframe Sampling values by creating a display attribute property. In the Attribute Display property editor, set the Attribute value to NbSubSamples, and set the other options as you like.

For information on how to create a display attribute property, see Displaying Attribute Values.

In this image, you can see that the Subframe Sampling value is set to 20.

Caching Subframe Sample Data

When an ICE simulation is using subframes samples, you can cache the simulation frames as "regular" frames or you can choose to cache the frames with the Subframe Sampling value.

You can cache subframe samples using either the Cache Manager or the Cache on File node: both ways are described here.

Caching Subframe Samples from the Cache Manager

  1. Open the ICE-simulated object's Simulation Settings property editor and set the Subframe Sampling value, as described above.

  2. To cache the simulation using the current Subframe Sampling value, select the Cache Manager - Cache All Simulation Samples option so that each subframe is saved in the cache file.

    If this option is off, the simulation frames are cached as whole, non-sampled frames.

  3. Click the Open Cache Manager button to do just that, then write the ICE simulation to a cache file as described in Writing Animation or Simulation Data to Cache Files.

  4. To load the cache file onto an object and the cache clip into the animation mixer, see Using Cache Files in the Animation Mixer.

    Each subframe is saved in the cache file, and the cache file is automatically scaled to match the speed of the original simulation. For example, if the simulation you cache is 8 frames long and the Subframe Sampling value is 20, then 160 subframes are actually saved in the cache file, as you can see with the values displayed on the cache clip below.

    Using the subframe data, you can retime the cache file in the animation mixer with more precision than with full-frame caches.

    You can scale the timing of clips using the Scale value in the Time Control property editor, or use the timewarp curve to adjust the simulation timing or reverse it.

    See Scaling Clips and Changing Time Relationships (Timewarps) for more information on these options.

Caching Subframe Samples with the Cache on File Node

  1. Open the ICE-simulated object's Simulation Settings property editor and set the Subframe Sampling value, as described above.

  2. Open the ICE Tree view for the simulated object and plug the Cache on File node in the simulated object's ICE tree.

  3. Write the simulation to a cache file as described in Writing Cache Files in the ICE Tree. Make sure to select the All Simulation Samples option in this property editor so that the subframe samples are cached.
  4. On another object (or the same one), set up the Cache on File node to read the cache file as described in Reading a Cache File in the ICE Tree.

    Make sure to select the All Simulation Samples option so that the cache file is automatically scaled to match the speed of the original simulation.

    If this option is off when reading the cache file, every subframe is read as a regular frame so the simulation will be slower (if the number of subframe samples is greater than 1).

Updating Scenes and Compounds to Use Subframe Sampling

In order to use subframe sampling for scenes and compounds from Softimage versions previous to 2012, there are a few steps you must follow. In older ICE simulations, the Simulation Settings property was not created and a previous version of the EvolveOp operator (the operator used to compute things in the Simulation region) was used.

Updating Older Scenes

To update a scene from a Softimage version that is previous to version 2012, follow these steps:

  1. Select the ICE-simulated object and open the ICE tree. In the construction stack on the right, you can see the current ICETree node in the Simulation region.

  2. Move the ICETree node out of the Simulation region and into one of the regions below, such as Animation or Modeling. This is temporary.

  3. Delete the Simulation region marker in the ICE construction stack.

  4. Create a new simulated ICE tree so that a new Simulation region marker is created with a new ICETree node in it.

  5. Delete the new ICETree node, then drag your original ICETree node back into the Simulation region.

Now you've got the new EvolveOp operator and the Simulation Settings property for your ICE simulation.

Most of the ICE sample scenes, including Lagoa scenes, that used the Simulation Step node have been updated so that they can use subframe samples.

Updating Older Compounds

If you've created compounds using a Softimage version that is previous to 2012, you will probably need to update them if you want them to be able to use subframe samples with a value over 1:

  • If your compounds are time-based, you don't need to update them.

  • If your compounds are frame-based (they use the Simulation Step node), you need to update them with the Frame Step node instead of the Simulation Step node. The Frame Step node can process subframes while the Simulation Step node doesn't.

You can use the Compound Version Manager to check if the compounds use the latest version of the nodes (tagged "SubFrame Support") - choose Compounds Compound Version Manager in the ICE Tree view.

See Versioning Compounds for information on how to update the version of your compound.

Updated Factory Nodes and Compounds

The following factory ICE compounds that used the Simulation Step node have been updated to use the Frame Step node to be able to handle Subframe Sampling values greater than 1: