The Camera object is used to display the objects in your scene. Each effect requires at least one Camera to render out the scene. The Camera will also render everything in the selected Layer to the Render Texture. A project is able to have multiple objects rendered on different layers.
Add Camera object
You can add a Camera object by selecting the +Add object > Scene > Camera from the Hierarchy panel. You can watch your scene render in the Preview window.
Perspective Camera (3D) and Orthographic Camera (2D)
There are two types of cameras: Perspective Camera (3D) and Orthographic Camera (2D).A Perspective Camera (3D) displays objects in a virtual world in three dimensions, allowing for the perception of depth and volume. When you add the camera object to the scene, the Camera a 3D camera by default.
An Orthographic (2D) camera displays objects in a virtual world in two dimensions, making your scene appear flattened. To configure the camera to be a 2D camera, select the Camera object in the Hierarchy panel. Then change Camera Type to Orthographic in the Inspector panel under the Camera component, .
Move your Camera in a 3D scene
Select the Camera object and adjust the Transform component attached. Doing so adjusts the camera’s transform properties, including Position and Rotation.
You can either adjust the gizmo to manipulate the position, rotation, scale, or type the value in the Transform component under the Inspector panel.
Certain settings can cause the camera’s transform function to be overwritten. In these cases, nothing will affect the final render, no matter how you adjust the camera transform or camera parameters. Cases that overwrite the camera settings: 3D Face Binding component has been assigned to the scene object.
Preview in Effect House
After configuring your scene and cameras in Effect House, you can view the Preview panel to get a sense of how your final project will look. You will be able to see your scene objects overlaid on default preview videos, your webcam video, or local media that you can upload. You can use this panel to configure the exact positions and render textures of your camera(s) while you are developing your effect. What you see in the Preview window matches the Final Render Output Render Texture.
Preview on TikTok
For more accurate testing, use the Preview on TikTok button to preview your project in the TikTok app.
Use Multiple Cameras in the Scene
When you want different cameras to render different objects or render one object on top of other layers, you need to set up the render order and render layers. To learn more about how to set up render layer, render order, check out Use multiple cameras for more details.
Customize the Camera’s Render Texture
You can also use a custom Render Texture to have a sneak peek into what the camera is viewing in the scene and display it onto an image. To learn more about how to play with render texture, check out Customize Render Texture for more details.
Camera component properties
- Layers: Renders all scene objects that are set to the selected layers. You can select multiple layers for one camera.
- Default Layer
- Layer 1 – Layer 63
- Render Texture: Sets the render output of this Camera to a Render Texture. You can use the default Render Texture, Final Render Output. This Render Texture uses the webcam video frame by default so it shows what the webcam or the Phone’s camera is viewing. Or you can create a new render texture and assign it to this property.
- Render Order: Controls the render order within this Camera‘s render texture. A camera with a lower value will render the scene on top of a camera with a higher value.
When there are multiple cameras in the scene, you need to change layers as well as the render order. If camera A’s render order is 3, in order to make camera B be rendered on top of camera A’s rendering result, we should set camera B’s render order > 3.
- Viewport:Indicates where on the screen the camera is viewing.
- X: The beginning horizontal position of the camera view.
- Y: The beginning vertical position of the camera view.
- W: Width of the camera output on the screen.
- H: Height of the camera output on the screen.
- Camera Type: Decide how the camera projects objects in the scene onto the screen.
- Perspective: The Perspective Camera simulates how perspective and depth-perception work in the real world. Everything looks small in the distance and larger the closer they are to the Camera.
- Orthographic: The Orthographic Camera does not represent the object as it would be recorded photographically or perceived by a viewer observing it directly. It is a parallel projection, the lines will stay parallel in every circumstance.
- FOV (field of view): (Perspective Camera only) The view angle of the Camera .
- Ortho Height: (Orthographic camera only) The height of the camera clip plane.
- Near: The closest distance the Camera can render.
- Far: The furthest distance the Camera can render.
- Clear Type: Several clear type options for customizing your render texture.
- Color: Fill the render texture with the plain color you set up.
- Depth: Clears the depth buffer from a previous render texture. Redetermine the depth when drawing the new render texture.
- Depth color: Fill the render texture with the plain color you set up.Clears the depth buffer and color buffer from a previous render texture.
- Don’t: Does not clear any buffer from the previous Render texture.
- Depth stencil: Clear the depth buffer with a stencil buffer from a previous Render texture.
- Color depth stencil: Fill the render texture with the plain color you set up. Clears the depth buffer with both a stencil buffer and a color buffer from a previous Render texture.
- Clear Color: If Clear Type is set to Color or Depth color or Color depth stencil, the Render Texture of this Camera will be filled by this plain color you set up.