Compositing - Unreal and After Effects
- L K
- Apr 25, 2022
- 2 min read
Updated: Apr 26, 2022
Set up previz camera in Unreal

Use simple actors to represent characters and test out camera setups/movement. This is a static shot requiring two people in shot, with a food stall between.
Film Greenscreen elements



I took some notes and measurements from my Unreal Engine scene. This mostly went unused as time in the greenscreen was limited, and being able to set up strong lights to represent the sun was impractical.
I still think that this was a good exercise and is a more practical solution than trying to match by eye to you previz shots. For shots with more complicated choreography, markers could be left for actors to locate themselves within the scene. Locked camera shots would need little adjustment afterwards as you'd know exactly where it was positioned.
Rotoscope/Key/Track

This footage has no camera tracking - I had severe issues with this workflow which I will detail in another post.
The footage is mostly rotoscoped, with a little bit of keying to clean up some of the tight corners/edges.
Match camera in Unreal
This is more critical with moving cameras. However the greenscreen elements do not match perfectly, so a new camera was created in Unreal to try and mimic the position of the greenscreen footage closely.
Export Background Plates

Hide any unwanted actors in the scene from the render before rendering. I also rendered two sequences for this shot - One with and one without the food stall which will be between the actors.

Ensure before rendering that your Unreal Engine camera matches the framerate and length of your greenscreen footage. Checking the "Composition Settings" of your footage in AfterEffects will show both of these.


To see the composition duration in frames instead of seconds:miliseconds, Ctrl+click the timing display on the Ae timeline


Import into After Effects
Before importing ensure that your import settings have the framerate correct. then import the image sequence.

Compositing

After layering and combining all the different sequences into a new composition, you then need to add effects and adjust the footage to try and get them to match as closely as possible.
Some effects will also need to be keyframed based on whether things in the scene are moving. The actor walking up to the camera in this case moves out of focus, so a keyframed animation for 'Camera Lens Blur' was added.


A matte of the stall between the actors was also needed in this case. This is a simple drawn mask with some feather to try and match the lens blur on the stall.
I exported two passes of the footage to try and avoid this, but as far as I'm aware there is no way to export a sequence from Unreal Engine with a transparent background, so this stall was always going to be needed to be separated from the background.
You'll notice that I had the two actors in separate rotoscope precomps so that I could layer them appropriately in the scene.
Shadows can be an issue when compositing, and will often have to be added in. This other shot has some faked shadow added to the stall counter top.


In this case I used the rotoscoped footage deformed on a 3D layer to roughly match the plane of the stall with a 'drop shadow' effect.
This shadow doesn't match the lighting direction properly, but makes the shot more convincing.

Comments