Magma is normally applied to the particles while loading, as part of the modifier stack evaluation. The RESULT of that gets cached in the PCache. So if the Magmas are changing the particle count, you have no other choice but to reload. Same applies to the regular culling feature of the PRT Loader. It is applied at the end of the modifier stack after the particles are transformed to world space, but still before they are stuffed into the PCache.
Expanding on the loading process description, here is what happens when loading with PRT Loader:
*Each PRT Loader is processed sequentially, but each PRT sequence within the same PRT Loader gets its own thread. With 8 cores, you can load 8 PRT sequences in parallel for a 6 to 8 times better performance, as long as the drive can keep up IO-wise.
*Note that there is a certain overhead related to opening multiple partition files though. So while reading from 10 or 20 files is better than loading from 1 or 2, loading from 100 might turn out to be a bit slower due to that overhead. This was even more pronounced when loading was single-threaded before v2.0. So we recommend creating partition counts close to the CPU count. If you need 100 MP, 10 partitions x 10MP are probably a better idea than 100x1MP.
*The particles from every PRT stream are unzipped in chunks of about 50,000 at a time, then passed up the stack for processing.
*The particles are passed through all deformation modifiers on the stack bottom to top. They are represented as vertices, so the Max modifiers believe they are operating on a TriMesh with no faces. If there are Velocity or Normal channels, they are passed separately from the Positions through the modifiers. This is as fast as with regular meshes in Max, but it is single-threaded due to the Max modifier stack design. If a Magma modifier can be used instead of a Max deformation modifier, it is recommended (see below).
*Magma modifiers are also evaluated if encountered. Magma modifiers are multi-threaded internally - the more nodes and more complex the flow, the better the CPUs are saturated.
*The particles are transformed into world space by the Node Transforms of the PRT Loader, if enabled. Loading directly in world space (Use Node Transforms OFF) should be faster.
*Any SpaceWarp bindings are processed to produce deformations in World Space.
*The PRT Loader culling is performed. The particles are already in world space and are tested against one or more geometry objects. This was added before we had Magma. Magma culling is more flexible, but can be slower, esp. if using InVolume.
*If a Material is assigned to the PRT Loader, the shader tree is evaluated for each particle to produce a Color, Density multiplier, Emission,Absorption, SpecularLevel and SpecularPower data as needed. This can be relatively slow. If something can be done with a Magma, e.g. Color assignment, it is better to use a Magma modifier. The Krakatoa Material is a Max Material front-end to a Magma-based back-end, so it is very fast in comparison to Max Materials!
*The Global Channel Overrides are applied. These are Magma modifiers that are applied to the world space of the particles and can change their channels before the data is stuffed into the PCache.
*The Global Value Overrides are applied. These are hard-coded Color, Emission, Absorption and Density overrides that can replace the channels of ALL particles with global values before the particles end up in the PCache. In earlier versions of Krakatoa, these were actual render-time values and could be changed with PCache on. But in v1.5 we added the ability to specify global texture map overrides which made it impossible to preserve the old way of doing things.
*Only the channels requested by specific features are now stored in the PCache. See Memory Channels rollout to see what is there.
*A note about shading - some of the Phase Functions (e.g. Phong, Marschner etc.) expose additional properties AND optional per-particle channels. If the per-particle channel for, say, SpecularLevel is not checked, the value is applied at render time and is independent from the PCache. As long as there is a Normal channel, you will be able to tweak the specular highlight’s shape without reloading. But if you enable a per-particle channel for SpecularLevel and there is no such channel, the PCache will have to be rebuilt, and if it exists, it will be locked and reused if PCache is on. The actual (Phong) Shading is performed in camera space at render time, so you can move the camera and get correct speculars with an enabled PCache…
Now if you lock the PCache, all channels that were stored in the PCache will be locked and reused. You cannot change anything about them, e.g. Position, Color, Emission etc. What you can modify are the Global controls like the Density multiplier (Lighting/Final Pass Density Value/Exponent), Emission Strength etc. These are applied at render time. Also, Camera-space effects are generally calculated at render time, e.g. Environment Reflection Maps. Only the Normal is stored in PCache, the color of the Environment is looked up at render time, so moving the camera produces correct reflections with locked PCache.
The LCache only locks the Lighting channel. If engaged, the Lighting channel calculated in the previous render will be locked in place and will be reused. If a light is moving, you won’t see the effect unless the LCache is disabled to allow for dynamic lighting.
You can see a graphical representation of everything I wrote above by opening the Krakatoa Schematic Flow!
We HAVE talked in the past about a possible higher level of Magma that could be run at render time over the PCache, but we don’t have this feature yet. If we had it, it would probably do what you asked for…