Cache your nParticle simulation

 
 
 

When you play the simulation, notice that it plays back much slower than before. This is due to the additional calculations required for the nParticle object’s output mesh. You can use Maya's nCache feature to cache the simulation and play the scene at a faster speed. See nCaching overview in the nDynamics guide.

To cache your nParticle simulation

  1. Before caching the simulation, hide Water_Mesh object, by selecting it in the Outliner, and selecting Display > Hide > Hide Selection.

    Hiding the output mesh speeds up the nCaching process.

  2. In the Outliner, select Water_Mesh.
  3. Select nCache > Create New Cache > .

    The Create nCache Options window appears.

  4. In the Create nCache Options window, do the following:
    • Set the Cache directory to the folder where you want your caches saved.
    • For File distribution, select One file.
    • Set the Cache name to LiquidSimulationCache.
    • Click Create.

    Maya plays the scene automatically and stores the frames in the directory you specified.

  5. After the simulation is cached, show the Water_Mesh by selecting it in the Outliner and selecting Display > Show > Show Selection.
  6. Play the simulation.

    Notice that the scene now plays back faster. You can also scrub slowly through the timeline and view your simulation frame-by-frame. If you change any of the nParticle attribute settings, create a new cache to see your changes.

In the next section of this lesson, you use the cached simulation to help optimize specific areas of the simulation.

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