How to set up a basic Virtual Production composition in Unreal Engine (Quick Start)

How to add a CG Element, Media Plate and Matte to create and output a basic Virtual Production composition from Unreal Engine
Written by Off World Live
Updated 1 year ago

Learn how to create three different content layers in Unreal Engine's Composure and output them in a single 'Comp':

Please use 'Linear color space only' in your Alpha Project Settings as recommended for Composure. You can change this by going to Project Settings> search 'alpha' and select from the drop down:
If you want to render landscapes and foliage, please ensure to use OWL Composure elements for all layers of your Comp as described below.
  1. 'Compositing' is the process of layering multiple media planes on top of each other to create a final blended output:
  2. In this example we will create a composite of three layers for a final video output like this: 
    1. OWL BG Element: This is a background virtual space into which our media content will be placed:
    2. OWL Media Plate: This is the recorded video or live video feed that we want to layer into our virtual scene (this can also be chromakeyed):
    3. OWL Matte: This is the layer we want to use to cut out foreground elements from the media plate (garbage matte) so that they show in front of the video feed and make it look like the video elements are behind:
    4. The final result is a combination of the three layers like this:
  3. First create the 'Comp' which will combine these three layers:
    1. Go to Window> Virtual Production and select Composure Compositing:
    2. Right-click in the new panel and select 'Create New Comp':
    3. In the list of options select 'Empty Comp Shot':
    4. Name the Comp how you like:
  4. Next, we will add the OWL CG Element layer:
    1. Right click on the main Comp you have just added and select 'Add Layer Element':
    2. In the pop-up go to 'All Classes' and select 'OWL CG Element':
    3. Now in your main Comp you will see a cg_element which you can rename as you like (use OWLBG if you are a beginner):
    4. This OWL CG Element will automatically attach to any Camera that you have in your scene and show you it's output in a thumbnail (bottom right).
    5. If you don't have a Camera, add a Cinecam or OWL Cinecam from your 'Place Actors' panel.
    6. If you have multiple Cameras and you want to attach the CG Element to one of them, go to the Details panel of the CG Element> Composure> Input> Camera Source> Override and select the Camera you want to track from the list:
  5. Now we can add the Media Plate layer: 
    1. Right click on the main Comp you have just added and select 'Add Layer Element':
    2. In Common select 'Media Plate':
    3. Now in your main Comp you will see a Media Plate which you can rename as you like (use OWLMEDIA if you are a beginner):
    4. To add a video input in the Details panel of the Media Plate go to Composure> Input> Media Source. You can select between an Unreal Media Texture (for Video Playback) or OWL NDI/ SPOUT/ Screen Capture Input Passes (for live-video streaming):
    5. You will now see your video input appear in your Media Plate thumbnail:
    6. If you need to Chromakey your video feed then you can use the Chromakey 'Transform Passes' to do so as explained here:
  6. Now we can add the OWL Matte layer. This will cut out the shapes of our selected elements from the layer below it (in our case the Media Plate) making it look like those elements are in front of it:
    1. Right click on the main Comp you have just added and select 'Add Layer Element':
    2. In the pop-up go to 'All Classes' and select 'OWL CG Matte':
    3. Now in your main Comp you will see an OWL CG Matte which you can rename as you like:
    4. In the Details panel of the Matte you can go to Composure> Input> Capture Actors and click plus to select a group of objects to include:
    5. To create a group of Actors you need to add a Layer in Unreal by going Window> Layers:
    6. Now go to your Unreal Viewport and select the Actors you want to include in your Layer (click Control to select multiple at once) and then right click in Layers to Add Selected Actors to New Layer:
    7. Give the new Layer a name (use OWLMatte if you are a beginner):
    8. Now go back to the Details panel of your Matte and in Composure>  Input> Capture Actors you can now select your layer:
    9. In Group Type select 'Include' (to include only those Actors in your layer):
    10. Finally, we want to choose the type of Matte. In this case we want 'Garbage Matte' because we want to cut out the select shapes from the Media Plate so that they appear in front of it: Details> Matte Pass> Garbage Matte:
    11. Now in your OWL Matte thumbnail you can see the outline of the actors you want to cut out from your Media Plate: 
  7. Now we have our three layers set up, we can go to our main Comp to combine them together: 
    1. In the Details panel of the Comp select the same Camera as you have used for your Layers:
    2. Now we need to add a Transform Pass which combines our three layers into our final Comp: Details> Composure> Transform/ Compositing Passes > add Transform Pass: Compositing Element Material Pass:
    3. In the panel that opens you need to Create New Asset: Material:
    4. In the Material Editor that pops-up in Details> Material change Material Domain to Post Process:
    5. Now copy-paste the Material blueprint below into your Material Editor:
    6. Finally, select each of the TextureSampleParameter2Ds and in the Details panel rename them each of your three layers like in the image below (if you have named your layers something else you need to use those names):
      1. The 'Over' node layers the Media Plate (A) over the OWLBG (B).
      2. The OWLMatte 'masks' the Media Plate (A) which cuts out the shapes in the Matte from the Media Plate.
      3. The Media Plate, OWLBG and OWLComp all use BGRA because they contain all colors and alpha.
      4. The OWLMatte only uses R because it only needs the single color to stencil out the shape from the Media Plate.
    7. Compile and save your Material! This material is combining our three layers into a single image:
    8. You will now also see the three layers that you have added in your Materials in your Transform Pass:
    9. We have now successfully combined the three layers into a single image:
  8. However, If we check our Comp we can see that the Media feed fills the whole screen and is not properly scaled to our scene:
    1. To solve this, we need to add an OWL Video Plane Placement Actor which dynamically scales the size of the media feed to match the position of your camera: 
    2. Go to 'Place Actors', search 'OWL', select OWLVideo Plane Placement and drop it into your scene:
    3. You will now see a Video plane with the OWL logo which you can position in your scene where you want your talent to go (this can also be controlled dynamically):
    4. Now in your Media Plate Details panel go to Composure> Transform/Compositing add a new Transform Pass and select OWLPlane Transform Pass:
    5. In the OWL Plane Transform Pass select:
      1. For Plane, the OWL Video Plane you added in step 9/10; and
      2. For Camera Override, the Camera you are using for your OWL CG Elements (steps 4.4-4.6 above):
    6. Now when 'Enabled' is ticked you will see your Media scale perfectly into your scene:
  9. Congratulations! You have now created a simple Comp in Unreal. However, you move the camera you will see your three layers perfectly aligned together creating the illusion that they are all part of the same 3D space!
  10. You can output your Comp by going to the Details panel of your main Comp> Output> Outputs:
    1. The OWL NDI and Spout Output Passes let you stream your output direct to OBS or VMIX (see linked guides).
    2. Alternatively, you can use the Render Target Compositing Output and record direct to disk using OWL Media Output as shown here:
Did this answer your question?