AR Suite
...
AR Workflow
Compositing: Legacy Composure ...

Step 7 - Configuring the Composure Stack

16min

Create a Composure Comp and add the film input

Once the camera has been set-up the Composure composite can be created. Start by opening the Composure window from the Virtual Production tab of the Window menu.

Open the Composure Compositing window
Open the Composure Compositing window


Right-click within it to create a new empty Composure Comp shot.

Right-click to create a new empty Composure Comp shot.
Right-click to create a new empty Composure Comp shot.


Video Configuration without a Keyer

This step should only be completed if the "Video" Input Configuration option was chosen when running the Workflow Wizard and therefore no Keyer is required.

Once the comp has been created it's input needs to be connected to the Media Bundle texture that was configured during Step 3 - Add Media Bundles . Do this by selecting the Comp and expanding the "Input" section within it's property panel. Add a new input to the "Inputs" array by clicking on the "+" button. Expand the list of inputs and set the type of the new input pass to be a "Texture Input". Make it reference the "T_Video_BC" asset before finally setting the pass' name to "Film".

Document image


Video Configuration using the Composure Keyer

This step should only be completed if the "Video with Composure Keyer" Input Configuration option was chosen when running the Workflow Wizard becuase the video requires keying.

The "Video with Composure Keyer" Input Configuration option within the Ncam Workflow Wizard generates a BP_MediaPlateCompElement within the scene that is automatically connected to the input media device. It can be used to remove green/blue screen from the input video. As it has already been configured just move it into the Comp composure stack.

The Comp composure stack with the video keyer.
The Comp composure stack with the video keyer.


Configure the amount of Overscan

Overscan is required to correctly render lens distortion when using the legacy composure pipeline. It allows the BP_NcamCgCapture media layer to capture additional pixels (expressed as a percentage of the resolution) to account for the lens distortion requirements. The amount of overscan that is used is managed from the project settings and a value of 1.2, which is the default, is typically a good starting point. This value might need to be increased when particularly extreme lens distortion is present.

Document image


Add an Ncam Distortion Map Layer Element

A “BP_NcamDistortionMap” media plate layer must be added to the stack to apply any lens distortion to the CG capture. Create it by right-clicking on the Comp and selecting "Add Layer Element" followed by "BP_NcamDistortionMap". Name the new layer as "Distortion".

Add a BP_NcamDistortionMap media layer element
Add a BP_NcamDistortionMap media layer element


Add an Ncam Cg Capture Layer Element

Unlike standard Composure composite stacks this workflow requires the use of a special CG layer called a "BP_NcamCgCapture". This layer captures the CG but with an additional amount of overscan so that the lens distortion layer can be correctly applied. Just as before, create it by right-clicking on the Comp and selecting "Add Layer Element" followed by "BP_NcamCgCapture". Name the new layer as "CG".

A BP_NcamCgCapture layer element is required for the lens distortion to be correctly applied
A BP_NcamCgCapture layer element is required for the lens distortion to be correctly applied


The minimum composure stack required is shown below where:

  • Comp - The Comp which includes the film media input.
  • Distortion - BP_NcamDistortionMap layer element.
  • CG - BP_NcamCgCapture layer element.
The minimum composure stack
The minimum composure stack


Add the Optical Offset Transform Pass

In order to crop and apply the optical offset to the CG (effectively removing the overscan) you need to add an “Optical Offset Pass” to the composing element, this should sit before the actual compositing material.

Add the Optical Offset Pass by first selecting the Comp and navigating to the "Transform Passes" section and clicking on the "+" button. Change the type to "Optical Offset Pass and ensure that the "CG" layer element is the input. Set it's name to "OpticalOffset" so that the following compositing pass can easily reference it.

Add the Optical Offset Pass to the list of Transforms. Ensure that it's input is the CG
Add the Optical Offset Pass to the list of Transforms. Ensure that it's input is the CG


Create and add the Compositing Pass

The material used for the compositing transform pass will differ depending on how the various elements are being layered together. Usually an augmented reality composite is created in one of two ways. Either the CG is overlaid onto the video to create the illusion of a virtual object existing within a real scene or the inverse is achieved where a masked element is placed into a virtual scene. Both setups are explained in the following two sections. Follow the one which is appropriate for your scenario.

Virtual Overlay Composite (CG over Video)

In this example we will illustrate a "Virtual Overlay" composite where the CG is overlaid onto the video. This material is provided as part of the Ncam AR Suite Lite plug-in and can be found in the "Ncam AR Suite Lite Content/Composure" content folder. It is illustrated in the image below:

An example of a "Virtual Overlay" compositing material
An example of a "Virtual Overlay" compositing material


Note that the "ScaleUV" node is required to correctly sample and apply the lens distortion texture parameter to the CG.

Add the Compositing Element Material Pass to the Comp in a similar way to the Optical Offset Pass. Make sure that the type is set to "Compositing Virtual Element Material Pass" and the Material is set to "VirtualOverlayComposureMaterial". The CG input needs to be connected to the output of the Optical Offset Pass. The complete stack of transforms is illustrated in the image below:

The complete list of transform/compositing passes and their configuration
The complete list of transform/compositing passes and their configuration


Virtual Studio Composite (Keyed Video over CG)

In this example we will illustrate a "Virtual Studio" composite where the video which has been keyed (to remove the green/blue screen) is overlaid onto the CG scene. This material is provided as part of the Ncam AR Suite Lite plug-in and can be found in the "Ncam AR Suite Lite Content/Composure/" content folder. It is illustrated in the image below:

An example of a "Virtual Studio" compositing material
An example of a "Virtual Studio" compositing material


Note that the "ScaleUV" node is required to correctly sample and apply the lens distortion texture parameter to the CG.

Add the Compositing Element Material Pass to the Comp in a similar way to the Optical Offset Pass. Make sure that the type is set to "Compositing Virtual Element Material Pass" and the Material is set to "VirtualStudioComposureMaterial". The CG input needs to be connected to the output of the Optical Offset Pass and the Film input connected to the output of the keyer. The complete stack of transforms is illustrated in the image below:

Document image


Set and configure the output of the Comp

This step will only work successfully if an output device was added during when running the Ncam Workflow Wizard.

The final step is to output the result of the Comp over the SDI. This stage requires that the Ncam Workflow Wizard was run with at least one output device specified in the list of outputs.

To connect the output of the Comp to one of those output devices first select the Comp from within the Composure window. Scroll through it's properties to locate the section called "Output". Click the "+" button to add a new output to the "Outputs" list. Change the type of the output "Compositing Media Capture Output". This type allows the Comp to write it's output to an existing media capture device via a media proxy. In this case we want to connect it to one of the two possible devices created when running the Ncam Workflow Wizard. For each device there exists a proxy asset which should be chosen for the Comp's "Capture Output" attribute. For example, "OutputProxy0" will write the output of the Comp to the first device and "OutputProxy1" to the second device if it exists. These steps are illustrated in the image below:

Output the Comp to the first device specified when running the Ncam Workflow Wizard
Output the Comp to the first device specified when running the Ncam Workflow Wizard