Articles
Textures and Materials
The Camera Texture

The Camera Texture

The camera texture has been extracted from the scene and used as the texture for a plane to create the 'picture in picture' effect seen in the simulator.

When someone is using an AR effect in the camera, a live video is being captured.

You can play this video back live as a texture in the scene. Everything the camera detects will be extracted, with the aspect ratio of the device.

The camera texture can be combined with segmentation to separate someone from their background. You can also manipulate the pixels in the texture to modify the image - for example by changing the color of the pixels.

Creating the camera texture

Select the Camera in the Scene panel.

In the Inspector, click + next to Texture Extraction.

Texture extraction option being selected in the properties of the Camera scene object.

In the Assets panel, you'll see a texture called cameraTexture0:

cameratexture0 can be seen in the Asset panel.

You can now apply this texture to a material.

In the example below, we've extracted the camera texture and applied it to a material, which we've applied to a plane.

A live video of what the camera can see - the face of the user - is playing as a texture on the plane.

The camera texture has been extracted from the scene and used as the texture for a plane to create the 'picture in picture' effect seen in the simulator.
Was this article helpful?