Another GI cache problem?

Started by Hannes, October 08, 2022, 07:26:52 AM

Previous topic - Next topic


I have an animation scene with a huge population (almost 32.000.000 instances - not set to clip to camera, and not to repopulate each frame as well). I created a population cache file for that. As you can imagine it took quite some time, but eventually it was done. (2GB!!)
Now I want to create a GI cache file for the whole animation (every 5th frame as usual).
Why does TG insert the precached instances before each frame computation? (which takes a while - see attached image). I don't know yet, if this will happen before the actual rendering as well, but I thought TG reads the cache file, and the instances are in.


I'm not sure, naturally.

But I feel this is normal behaviour. It needs those instances to cache lighting for those objects, so it's reinserting them to then cache lighting?

It also seems like a failsafe for if objects have changed in a population between frames, something i doubt it would be dynamically aware of, and needs to recalculate light for all available instances.


Hi Hannes,

There are two stages that the renderer goes through when preparing populations for rendering. "Creating" and "Inserting". The population cache stores the results of the "creating" stage, which figures out how many instances there are and what their locations are, by sampling the distribution shaders and the terrain (or whatever they're anchored to). Those calculations are stored in the pop cache. The "inserting" stage is the process of linking the instance data to the scene in memory and integrating with the ray tracing acceleration structures. This needs to happen even if the instance data are in a pop cache. It should be much quicker than the creating stage, but with millions of instances it still takes time. When rendering multiple frames back-to-back it is probably doing more work than it theoretically needs to, because it's theoretically possible to reuse this scene memory in a way that it doesn't do right now.

How long is this part taking per frame?
Just because milk is white doesn't mean that clouds are made of milk.


Hi Matt,
thanks for the explanation. That makes sense. I guess, it takes about 30 to 45 seconds per frame (during the rendering process as well). It's not that much of a problem, I just wanted to know.