Sadly, stencil layers and nanite still don´t seem to work with 5.2.
Our workaround is:
- Try to put all assets you may want to separate on separate sublevels.
- Animate everything in your main sequence.
- Nest the main sequence as a subsequence/shot into another sequence (we add a prefix “RP_” for “Renderpass”.
- Add Level visibility track in the RP sequence.
- Use the visibility tracks for the sublevels to turn off all assets not wanted in a specific render pass, or needed as an extra layer (for color correction or fade in in post for example).
- Create as many RP sequences as you need and add them all to a movie renderqueue, then save the Movie renderqueue.
- Anytime you need to change the main sequence, it will automatically update in the RP sequences.
This is only a workaround, if you can easily separate assets like that and if you don´t need more complex compositing, as assets not rendered due to their visibility set will of course also not cast shadows etc.
You could also create a postprocesses material that makes everything invisible, that is NOT set to a specific stencil channel, but that has its own problems.