I have a setup where I am re-rendering the same geometry on several different layers. I want to change a property in the geometry's material before each layer runs (probably via a driver). The goal is to render out several different passes and have them all in the compositor together.
(I am aware this is possible with Scenes and different materials, but it is a ton of work to set that up when working with assets that will be linked into a bunch of different files. The simpler method seems to be to put several material setups in the same group, then mix between different outputs for each layer.)
For Renderlayer 1, the value is 0. For layer 2, the value is 1. etc.
I can manually do this by clicking the Render button on the Render Layer node in the compositor, then manually changing the material value, then manually rendering the next layer. But I need to automate it so that I can leave it running for long renders.
It seems it should be possible to solve this problem in a couple of different ways, but it depends on the details of how the render command works.
I could make a script that sets the property to 0, starts the render of layer 1, then when that finishes sets it to 1, starts layer 2, etc. For that, I need to know how I can have a script tell when a layer finishes rendering?
Or, I could have it start the value at 0, then detect when a layer starts rendering, and change it then. Either way, it needs to be able to have a script get info about when a layer starts or finishes.
Can anyone shed some light on how this can be done, or if there's a better way to set this up?