Patch Editor
Render Pass Patches
Face Extraction Render Pass Patch

Face Extraction Render Pass Pass Patch

Use the Face Extraction Render Pass patch to add the face tracker texture to effects that use render pass patches.

Face extraction lets you use a tracked face as a texture. This could be applied to a material on an object, or used to create a face swap effect.

Inputs

NameDescription

Size

The size of the texture output. For fixed sizing mode, this is in pixels. For the other sizing modes, this is a factor relative to the screen, camera or background.

Sizing Mode

Defines whether the size of the output texture is fixed or relative to the screen, camera or background.

Color Channel

Select from: RGBA, RGB, RG, R.

Eyes

Enable eye opening and alignment in the output texture.

Mouth

Enable mouth opening and alignment in the output texture.

Background

Select from: RGBA, RGB, RG, R.

Camera Texture

Connect to a camera texture patch. This could also be a camera texture processed by a render pass.

Tracked Face

The face tracker in the scene.

Output

NameDescription

Face Texture

The tracked face as a texture.

Example

The patch graph in the image below renders the face tracker texture in the scene:

The Scene Render Pass patch combined takes the cameraTexture and Device inputs and outputs a default render set up to the Screen Output patch, which is a property of the Device scene object.

The cameraTexture patch is also connected to the Face Extraction Render Pass patch. In the Face Extraction Render Pass the Tracked Face value is set to faceTracker0, which is the face tracker in the scene. As a result, a texture representing the face detected by the face tracker is passed to the material and rendered in the scene.

Was this article helpful?