-
Notifications
You must be signed in to change notification settings - Fork 24
Cameras in the scene and video background
At runtime, artoolkitX for Unity creates objects in the scene to render the camera feed behind your AR content. We call this the "video background". For a monocular camera, a single Unity Texture2D and a gameobject and components to render the texture are created during ARXController.StartAR()
, and dynamically updated each loop through ARXController.UpdateAR()
.
The video background requires its own layer. You specify this layer via the setting on ARXController:
The video background will be created in this layer, and associated with a 2D orthogonal camera which renders only this layer. While any Camera with ARXCamera component attached will have its culling mask set so as to not render the content of this layer, if you have other camera cameras in the scene you should unset this layer on their culling mask:
Since the video background image is not usually wanted in the Unity Editor scene view, it is recommended to hide the layer from the scene view using the Layers inspector. Click the "eye" icon so it is crossed out.