Skip to main content

Camera System

Cameras in Glitter support both legacy (field-of-view) and physically-based (focal length + sensor) modes. The engine ships with a database of 116 real-world camera sensor profiles covering cinema, DSLR, mirrorless, action, drone, and smartphone cameras.

Data source

All sensor profiles are sourced from the Physically Based open database by Anton Palmqvist.


Scene node format

A camera is added to a scene as a node with "type": "camera":

{
"name": "mainCamera",
"type": "camera",
"camera": { ... },
"transform": {
"translate": [1.0, 1.0, 0.0],
"look_at": [0.0, 0.5, 0.0]
}
}

The transform block supports an optional look_at field — the camera will face the given world-space point from its translate position.


Legacy mode

Specify field of view directly:

"camera": {
"fov_deg": 75.0,
"near": 0.1,
"far": 200.0
}
FieldDefaultDescription
fov_deg75.0Vertical field of view in degrees
near0.1Near clip plane distance
far100.0Far clip plane distance

Physically-based mode

When focalLength and sensorSize are both present, the engine computes the vertical FoV from physical optics, overriding fov_deg:

fov=2arctan ⁣(sensorHeight2×focalLength)\text{fov} = 2 \cdot \arctan\!\left(\frac{\text{sensorHeight}}{2 \times \text{focalLength}}\right)

Inline sensor parameters

"camera": {
"sensorSize": [36, 24],
"focalLength": 35.0,
"aperture": 1.4,
"focusDistance": 3.0,
"exposureCompensation": 0.0,
"near": 0.1,
"far": 500.0
}
FieldDefaultDescription
sensorSize[width, height] in millimetres
focalLengthLens focal length in millimetres
aperture2.8f-stop number
focusDistance1e6Focus distance in metres
exposureCompensation0.0Exposure value offset (EV)
near0.1Near clip plane
far100.0Far clip plane

Sensor database reference

Instead of specifying sensorSize inline, reference a real camera profile from the engine's sensor database:

"camera": {
"sensor": "cameras://physicallybased/arri_alexa_35.json",
"sensorFormat": "4.6K 16:9",
"focalLength": 50.0,
"aperture": 2.8,
"near": 0.1,
"far": 1000.0
}
FieldDescription
sensorcameras:// URI to a sensor profile JSON
sensorFormatName of the format entry to use from the profile's "formats" array

The engine loads the sensor file, finds the matching format by name, and extracts its sensorSize. If sensorFormat is omitted or not found, the first format in the file is used.


Camera hints

The scene file can include controller hints that determine how the camera behaves at startup:

"camera_hints": {
"mode": "orbit",
"orbit_target": [0.0, 0.5, 0.0],
"orbit_distance": 4.0,
"orbit_yaw": 180.0,
"orbit_pitch": 15.0,
"orbit_auto_rotate": true
}
FieldDefaultDescription
mode"free_fly""free_fly" or "orbit"
orbit_target[0,0,0]World-space look-at point for orbit mode
orbit_distance4.0Distance from target
orbit_yaw180.0Initial horizontal angle in degrees
orbit_pitch15.0Initial vertical angle in degrees
orbit_auto_rotatetrueAuto-rotate around the target

Sensor profile format

Each sensor profile in engine_defaults/cameras/physicallybased/ describes a real-world camera:

{
"description": "Physically Based — Arri Alexa 35",
"name": "Arri Alexa 35",
"category": "Movie",
"formats": [
{
"name": "4.6K 3:2 Open Gate",
"sensorSize": [27.99, 19.22],
"resolutions": [
{ "name": "4.6K", "size": [4608, 3164] }
]
},
{
"name": "4K 16:9",
"sensorSize": [24.88, 14.0],
"resolutions": [
{ "name": "4K", "size": [4096, 2304] },
{ "name": "UHD", "size": [3840, 2160] },
{ "name": "HD", "size": [1920, 1080] }
]
}
],
"tags": ["cinema"],
"sources": [ ... ]
}
FieldDescription
nameCamera model name
category"Movie", "Still", "Mobile"
formatsArray of sensor format options
formats[].nameFormat name — matched by sensorFormat in scene JSON
formats[].sensorSize[width, height] in mm
formats[].resolutionsAvailable pixel resolutions for this format
tagsClassification tags (e.g. "cinema", "dslr", "drone")
sourcesCitation / reference URLs

Common focal lengths (full-frame 36×24 mm)

Focal lengthVertical FoVCharacter
14 mm81.1°Ultra-wide
24 mm53.1°Wide
35 mm37.8°Standard wide
50 mm27.0°Normal
85 mm16.1°Portrait
135 mm10.2°Telephoto
200 mm6.9°Long telephoto

Available sensor profiles

The engine ships with 116 physically-based camera profiles organised by category:

Cinema

ARRI Alexa 35, Alexa 65, Alexa LF, Alexa Mini, Alexa Mini LF, Alexa SXT W, ARRI Amira, Arriflex 765, Blackmagic Cinema Camera 6K, Blackmagic URSA series, Canon EOS C-series, DJI Ronin 4D, Panavision Millennium DXL2, Phantom Flex4K, Phantom 65, RED Dragon, RED Gemini, RED Helium, RED Komodo, RED Monstro, RED V-Raptor, Sony Burano, Sony Venice, Sony Venice 2, Sony F5/F55/F65, Sony FX series, and more.

Still / DSLR / Mirrorless

Canon EOS R5, Canon EOS 5D Mark IV, Fujifilm GFX100 II, Fujifilm X-T5, Hasselblad X2D II, Leica S3, Nikon D850, Nikon Z9, Sony Alpha series, Panasonic Lumix series, generic full-frame/APS-C/medium-format/four-thirds profiles.

Mobile / Action / Drone

Apple iPhone 13–17 Pro series, GoPro Hero12 Black, DJI Mavic/Phantom series, generic 8mm/16mm analog profiles.