Transparent Capture
AVPro Movie Capture supports adding transparency to captures.
You can directly encode transparency into your capture when using a codec that supports alpha channels such as Apple ProRes 4444. See the codecs page for information about which codecs support transparency.
We also provide support for capturing transparency as part of each frame. This can be either left/right, where the alpha channel is encoded to the right half of the frame; or top/bottom, where the alpha channel is encoded into the bottom half of each frame. Recombining the alpha channel with the colour portion is best done in a shader, examples of which can be found with our video playback plugin AVPro Video.
To encode using transparency:
- Use a
CaptureFromCamera
component or if you use the Editor Window select “Camera” as the source type - Select the method used to encode transparency
- Set the background colour of your capture camera and make sure the alpha value is 0
- Set the capture camera clear flags to “Solid Color”
- If you’re using the
CaptureFromCamera360ODS
component then make sure to set the Camera Clear Color alpha to zero in the capture component settings - If you are using
Top Bottom
orLeft Right
transparency modes you will need to add theAVProMovieCapture/SideBySideAlpha
shader to theAlways Included Shaders
list
Note
Unity by default is not a compositing system so the alpha channel it generates is generally only for alpha blending during rendering and is not designed to be correct for exporting. You may need to create or tweak shaders to ensure that the correct alpha values are being rendered
Note
Plese be aware that many post-process filters do not preserve the alpha channel