Pipelined Pre-Process for GPU Renders with multiple layers/scenes/frames
Current situation for GPU renders: CPU performs a (potentially lengthy) pre-process for BVH and compute kernel compilation (or something), then hands this off to the GPU for rendering. The CPU then sits basically idle waiting for the GPU to finish. Once the GPU has finished, the CPU performs the next pre-process while the GPU now sits idle.
Watching this happen on an animation with multiple layers and scenes composited together, where pre-process is (in my case) nearly %50 of the total render time is infuriating 😅.
Ideally, the user would be allowed to set a maximum system memory usage and CPU thread count for preprocessing and the preprocessor would be allowed to "work ahead" as far and fast as it can until it's memory budget is used up. (simply letting it go "one step" ahead would be very nice but wouldn't always help, as sometimes the next layer is very fast but the "second next" layer is very slow for example)
However I understand that predicting memory consumption might not be possible, in that case simply allowing us a fixed integer to set how many "jobs" ahead we would like it to work would be a huge win already.
In the worst case where render time is a perfect 50/50 split between preprocessing and rendering, this would provide a 2X speedup.
4 Comments
I work with Autocad Files that are very complex and lagistically cannot be cleaned / simplified in the time allotted. This means my render times are stupid long, and most of it is spent building BVH. Being able to compute these things multiple frames ahead of time would be a godsend!
You know that Cycles can use GPU and CPU right? How could Blender manage this? Anyway great idea. I rendered some heavily (adaptive)subdivided ocean simulations, and a feature like this would have sped up every frame
* @Bo Shi * This applies only for non-changing BVH scenes. @cerebral suggestion is even smarter