you can use Render Target Texture to do most of it : )
for example here, I wanna render only the sphere and just red in color to a texture
and also get the depth of the scene
so you can, on each render, before your RTT renders, change the scene state to however you want and after the rtt render restore it : )
and you can do this at a resolution you specify!
you can even have a separate camera for each different RTT by changing the rtt.activeCamera
you can get the depth in your chosen rtt like (say if you want it from a different res or cam)
(source: Using a custom depth texture source with post processes, rather than the DepthRenderer)
(you can also use a new DepthRenderer()
and the texture inside it like an rtt)
as for timing it for animations, if you change the state before and after that’d work, but idrk about timing the render exactly tbh