Maya Particle Caching Project

From BeauGunderson

Jump to: navigation, search

Maya Particle Disk Cache (PDC format) has many known problems. The main one being that when you cache, it tends to forget and more than likely break if anything is moved. Scene or more obvious, the cache file. That means, if you're working in a studio with a renderfarm and files need to be placed/copied to another location for distributed rendering, this could be detrimental to the rendering process (as I am experiencing now and in the past).

A resolution to this, is to actually look at the way Fluids in Maya are cached. Simply put, it writes out data that pertains to the Maya Fluid object into the \data folder. Once done cache'ing, graphing the Fluid Node in the hypergraph or hypershade will then show you an actual "cacheNode" directly connected to the fluid. This means that the said fluid knows exactly where its cache file is, you can re-load old ones, and not have to worry about needing to cache OTHER fluids if they exist in the scene.

If we examine the Maya PDC method, this writes out one gargantuan list of files for every frame for EVERY particle object wanting to be cached. Now, you CAN cache individual objects, but once you do, you cannot cache ANY other particles in the scene and use BOTH cache's simultaneously without destroying the currently loaded one. This is a huge problem. Another problem is that you can find NO direct connection to this PDC and any of the Particles in the scene. That means (unlike Fluids) that you cannot directly cache multiple Particles and have them loaded at multiple times. This is asinine.

Straight from the DOCS on the dynGlobals command, these are flags for them. (and dynGlobals node):

-overSampling (-os)
This flag will set the current overSampling value for all of the particle in the scene.
-active (-a)
This flag returns the name of the active dynGlobals node in the the scene. Only one dynGlobals node is active. It is the first on created. Any additional dynGlobals nodes will be ignored.
-listAll (-la)
This flag will list all of the dynGlobals nodes in the scene.

If you notice, this suggests you can have multiple dynGlobals nodes in one scene. The dynGlobals node is what controls WHAT particle cache is currently loaded. Why can you have multiple if when the -active flag suggests it will ONLY use ONE, no matter how many are in the scene. This is where the particle cache'ing flaw comes into play.

This is not the only problem. Even if you have a cache, Maya seems to be very touchy about its placement and location. If you even so much as MOVE this cache to another location (with the entire Maya Project file) and then SET the project to that location, 9 times out of 10, all bets are off and the cache will not be read. I believe this is a Known Bug that Alias|Autodesk knows about.

If we examine the dynExport command, we notice this specific format flag straight from the docs:

-format (-f)
Desired format: "binary" ("pdb"), "ascii" ("pda"), or "cache" ("pdc"). The pdc format is for use by the Maya particle system to cache particle data. The pda and pdb format options are intended for pipelines involving other software (for example, sending the data to some program written in-house); Maya cannot read pda or pdb files. There is no formal description of the PDB format, but the Gifts directory (in Maya 2.0 and later versions) contains the source and Makefile for a small, simple C program called "readpdb" which reads it. Note that you must compile and run reapdb on the platform (Intel or Irix) which you exported the files on.

The dynExport command is what is ran when you want to WRITE OUT a particle cache file. There is other flags to this command to dictate the actual actions, but this flag in general specifies what data format.

Views
Personal tools