Caching tips
Ramps
If you are animating per-particle rendering attributes by ramps, and you change those ramps, you'll see the change in playback even if the cache is enabled. This also applies to changes in hardware display/rendering attributes such as pointSize. To avoid any confusion, turn off the Use Particle Disk Cache attribute before you make changes to your scene, and re-create your cache just before you render.
If you are animating any attribute with expressions, or animating rampPosition, rampVelocity, or rampAcceleration with ramps, any changes you make to those expressions or ramps will not be visible in playback as long as the cache is enabled. Turn off Use Particle Disk Cache.
Particle collisions with rigid bodies
If you have a rigid body being driven by particle collisions, and you diskcache the particles, the rigid bodies will no longer evaluate correctly. In effect, the caching takes away the dynamic properties that allow the rigid bodies to evaluate and they can't detect the collisions any more. To cache such a scene, first bake out the rigid bodies (see "Baking rigid bodies," below), then disk-cache the particles. The same limitation and same workaround apply to in-memory caching as well.
Baking rigid bodies
The particle disk cache always applies to particles only. It does not apply to rigid bodies. In most cases, rigid bodies can compute their positions without needing to do a run-up. If you encounter any problems in this area, you can resolve them by baking out your rigid bodies, using the bakeResults command.
For example, to bake out rigidBody1 for frames 1 to 100, do this:
bakeResults -t "1:100" -simulation true rigidBody1;
You can't use the bakeResults command to bake out particle motion. It bakes out animation channels, such as translateX/Y/Z, not particle positions.
Even if unbaked rigid bodies do cause a run-up, the run-up will go faster if your particles are cached, because the particles are loaded from the disk cache instead of being recomputed.
Caching a sequence in two parts
You may find it necessary to cache two parts of a sequence separately. For example, if you cache frames 1 to 45 in one place, and frames 46 to 90 in another place, you must be sure that the two caches "line up" so there is no discontinuity from 45 to 46.
Make sure that the animation and dynamics the first time you cache are consistent with the second. Make sure you didn't add or change anything, or have something changed for you.
In particular, if you have expressions that use the MEL rand() function, you must make sure your expressions are properly reseeded (see "Reproducing Randomness" in Chapter 5 of Using Maya: Expressions).
Caching a single particle object
Using Solvers > Create Particle Disk Cache caches all particle objects in the scene. You can cache a specified object from the command line using the dynExport command (see the online Command documentation for information on the dynExport command).
You can also get this same result by using your operating system to delete the cache files for all objects you don't want read from the cache.
Caching only certain attributes
By default, all attributes are cached. However, you can cache only certain attributes using the dynExport command (see the online Command documentation for information on the dynExport command).
Post a comment