Caching TP with MXS

First, check out this great TP Caching script by Marc Auvigne:

http://www.scriptspot.com/3ds-max/scripts/tpcacher

If you want to script your own TP caching solution, one potential way goes something like this.

Note that this might seem complicated, but with some scripting skills you can automate it all very easily (see TP Cacher, above)

1) create a Maxscript .ms file containing the commands below, and set that as the Pre-Render Script in the Render Setup dialog.

2) The .ms file command could look like this:

(<yourDynset>.GetObject()).cacherecord <outputTPSFilename.tps> false false

Where <yourDynset> is something like:

$Thinking001.MasterDynamic.DynamicSets[1]

and where <outputTPSFilename.tps> could be something like:

C:\Caches\coolStuff.tps

3) Send your file to your farm (Deadline, Backburner, Qube, others...)

4) The slave will pickup the job, run the Pre-Render script, which calls the "cacheRecord" function, which caches the .tps

5) Then it will render the frame (though you can probably make this quit early after the cache is done)