Loading lessons...
Physical Cameras & Viewports
Physical Cameras & Viewports
To achieve cinematic visual styling, Unity cameras support physical camera simulation and multi-display output configurations.
Physical Cameras
Toggle Physical Camera in the Camera Inspector to simulate real-world camera hardware:
- Focal Length: The distance from the lens to the sensor (in millimeters). Lower values create wide-angle viewports; higher values zoom in on objects.
- Sensor Size: Adjusts physical film gate dimensions (e.g. 35mm, Super 16).
- Lens Shift: Offsets the camera sensor along the X and Y axes relative to the lens center. This lets you align horizontal lines (such as tall architectural columns) without tilting the camera, preventing keystoning perspective distortion.
Occlusion Culling
Standard camera frustum culling disables drawing objects outside the camera view. However, objects hidden behind walls are still rendered unless Occlusion Culling is configured:
- Go to Window -> Rendering -> Occlusion Culling.
- Mark occluder and occludee GameObjects as Occlusion Static.
- Bake the occlusion data.
- At runtime, the GPU skips drawing objects that are completely blocked by foreground geometry.
Multi-Display Output
Configure rendering to multiple screens:
- Assign different cameras to different target Displays in the Camera Inspector (Display 1 to Display 8).
- Use the
Display.displaysAPI in script to activate secondary screens when the game starts.
TL;DR
- Physical Cameras simulate Focal Length, Sensor Size, and Lens Shift parameters.
- Lens Shift prevents perspective distortion when framing tall objects.
- Occlusion Culling skips rendering objects hidden behind walls.
- Target Displays let you draw scenes to multiple physical monitors.