Hey all,
I do a lot of compositing using UE4 by making backgrounds in engine and then rendering out a png sequence from matinee to comp together with other assets in After Effects. It’s a bit of a process to separate background and foreground elements. The solution I have is placing a giant matte surface between the elements with a solid color and then keying that out in AE but I’m curious if there is a better way to do things or someway to render out transparency.
Thoughts?
Thank you.
I know that this is a fairly old question but I thought I’d reply, anyway, for people who may stumble across it now via Google. What I do is use unlit materials to render out a luma mask (note: this only works if you’re using scripted camera movements, not if you’re freely moving the camera and have got different camera movemens in each recording). Basically, what you have to do is this:
- Make sure you’ve got your scene,
camera, Matinee, etc. completely set
up and won’t need to make any more
changes to it. Render out the clip
with all materials, lighting, etc. as
you usally would if you didn’t want
to use masks/keying. Save your scene.
- Create a new material.
- In the material settings, change the
Shading Model from Default Lit to
Unlit.
- Create a new Constant node in the
material editor. Set its value to 1.
- Connect the Constant node output to
the Emissive Color input of the
material.
- Now apply the material to all objects
you’d like to later separate from the
background (again, make sure you’ve
saved first so you don’t overwrite
the scene in which you’ve applied
your regular matierals).
- If your scene’s background or the
objects you don’t want to include in
the mask aren’t already pure black,
create another unlit material, just
like the one before, only now you set
the Constant node’s value to 0, not
- Depending on your scene, either apply
this new material to whichever
object(s) are placed behind the
objects you want to mask out and/or
create a new Basic cube or BSP cube
(for scenes with more complex camera
movements you may need to use several
cubes or try using the inside of a
sphere with a two-sided material)
which you apply the black material
to.
- Place the cube behind the objects
you’d like to mask out and scale it
up so it fills up all parts of the
scene which will be visible during
your camera flyby.
- Render the scene with the exact same
settings (including camera settings)
you previously used. The resulting
clip can now be used as a luma mask
in After Effects.
Note: if there’s a big distance between the object you’d like to mask out and whatever is behind it, you may also be able to get away with just rendering out a Scene Depth pass of the original scene (without changing materials) and applying a Levels effect to it in After Effects but that only works if you.
As for proper transparency, that’s apparently included in the Sequencer which is currently being developed to replace Matinee.