Stencil Render Layers
Control over the soldiers in a key shot lead me to discover stencil render layers in Unreal.
I’m using ‘ts_010_0090’ again, I wanted to manipulate each soldier for additional grading and DOF work in Nuke.
First, as the name implies we need to create layers for the ‘Stencil Clip’ render to work correctly. In the Layer pane, make a layer for each asset and add them to the corresponding layers. I would name each layer after the asset, will make it much easier to ‘Shuffle’ out the asset in Nuke.
Using the ‘Movie Render Queue’ and in ‘Deferred Rendering’, simply add the ‘Array Elements’ you want. Add the layers you want. You will also want to select ‘.exr Sequence’ in the ‘Output‘ tab as this is essentially a multipass EXR.
In Nuke, we see the EXR as a ‘Beauty’ render and its corresponding alpha. All that’s needed is to drop down a ‘Shuffle’ node and we can get each soldier separated out.
Quick layout of the resulting shuffling of the passes, this gave me a heap of control over the shot, the passes were also rendered incredibly quickly from Unreal, so I was constantly tweaking the layers.