PerspectiveCamera#
Exposure is in EV stops (0 = unchanged, +1 = twice as bright), applied before tonemapping. Ambient occlusion (GTAO) darkens ambient and environment light only: strength 0 turns it off, 1 is physically based; radius is the world-space distance searched for occluders.
public sealed record PerspectiveCamera(float FieldOfView = 45, float Near = .05f, float Far = 100, float Exposure = 0, float AmbientOcclusion = 1, float OcclusionRadius = .5f, float ScreenReflections = 1, float ViewModelFieldOfView = 0)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
FieldOfView | float | get; init; | 45 |
Near | float | get; init; | .05f |
Far | float | get; init; | 100 |
Exposure | float | get; init; | 0 |
AmbientOcclusion | float | get; init; | 1 |
OcclusionRadius | float | get; init; | .5f |
ScreenReflections | float | get; init; | 1 |
ViewModelFieldOfView | float | get; init; | 0 |
ScreenReflections: 1: smooth surfaces reflect what is on screen (the reflected ray marched against the depth prepass, sampling last frame's colour), over the probe or environment reflection; 0: off.FieldOfView: The vertical field of view in degrees (the horizontal one follows from the aspect ratio: 72° vertical is about 104° horizontal at 16:9).ViewModelFieldOfView: The vertical field of view for view-model objects (RuntimeEntity.ViewModel: a first-person weapon and hands), drawn after the world over a cleared depth so they never clip into walls. 0 keeps the camera's own field of view; a narrower value (45–60) keeps a weapon's proportions at a wide world lens.
Members: Anaglyph · Autostereogram · AutostereogramSpacing · CrossEye · HeadParallax · HeadParallaxStopsAtWalls · HiddenCollections · PostProcess · WiggleRate · WiggleSeparation · WindowDistance
Anaglyph#
public float Anaglyph { get; init; }Anaglyph stereo for red/cyan glasses: the scene renders from two eyes either side of the camera, 63 mm apart times this value, through the same window as HeadParallax, and combines into one image (red for the left eye, cyan for the right). 0 is off, 1 a typical interocular distance, up to 4 exaggerates. It renders the 3D view twice. Only the game camera uses it.
Autostereogram#
public float Autostereogram { get; init; }Experimental random-dot autostereogram: look through the screen to fuse the repeating pattern and see opaque scene depth. 0 is off; 0..1 sets depth strength (try 0.5). Replaces scene colours and takes priority over wiggle and anaglyph. Only the game camera uses it. WindowDistance sets the depth scale; transparent effects have no separate depth, and silhouettes can streak.
AutostereogramSpacing#
public float AutostereogramSpacing { get; init; }Initial value: 8
Autostereogram's background repeat spacing as a percentage of the view width, 4..16 (default 8). Lower spacing is easier to fuse on a large screen. The random dots stay still while the scene is still.
CrossEye#
public float CrossEye { get; init; }Cross-eye stereo: right-eye image on the left, left-eye image on the right. Cross your eyes until the two images fuse in the middle. 0 is off; 1 uses 63 mm eye separation, up to 4 exaggerates depth. Try 0.5. Each image keeps the camera aspect ratio with black bars above and below. WindowDistance is the convergence plane. Renders the scene twice; takes priority over autostereogram, anaglyph and wiggle. Game camera only; 2D overlays are drawn once over the pair.
HeadParallax#
public float HeadParallax { get; init; }How much the view follows the viewer's head (Viewer.Head): 1 is life-size (the eye moves as far as the head), 0 ignores the head, up to 4 exaggerates. The view never turns; the screen acts as a window. Only the game camera uses it, never the editor's Scene View, and the eye stops short of walls.
HeadParallaxStopsAtWalls#
public bool HeadParallaxStopsAtWalls { get; init; }Initial value: true
Whether the head-coupled eye stops 5 cm short of solid surfaces between the camera and where the head would put it (on by default). Off lets it pass through walls, for the strongest effect in open scenes.
HiddenCollections#
public IReadOnlyList<string> HiddenCollections { get; init; }Initial value: Array.Empty<string>()
Scene collections this camera does not draw (by collection ID). Every collection is drawn unless listed here, so a new collection is visible until someone hides it. Only the game camera applies it: the editor's Scene View shows everything, and hidden uses still cast shadows, so a weapon or overlay camera does not punch holes in the lighting. A use in a nested scene use carries that use's prefixed collection ID and is matched by it.
PostProcess#
public PostProcessSettings PostProcess { get; init; }Initial value: new()
WiggleRate#
public float WiggleRate { get; init; }Initial value: 5
How many times a second wiggle stereo goes there and back (each viewpoint holds for half of it).
WiggleSeparation#
public float WiggleSeparation { get; init; }Wiggle stereo: the eye hops between two viewpoints this many millimetres apart, sideways, several times a second (WiggleRate). The window plane (WindowDistance) holds still while nearer and farther things rock against it, which reads as depth with no glasses. 0 is off; 4–12 mm is subtle. It adds to head parallax rather than replacing it. Only the game camera uses it.
WindowDistance#
public float WindowDistance { get; init; }Initial value: 2
How far into the scene the screen sits as a window, in metres: things at this distance stay put as the head moves, nearer ones shift one way and farther ones the other.
Related types#
Source#
- Model3D.cs