Viewport Camera

Position and orient a 3D camera in the scene.

What it does

Viewport Camera places a 3D camera in the scene and renders what it sees. Position, orientation and projection (perspective or orthographic) define the view. The Texture output is a live render-to-image capture from that camera, separate from the main interactive viewport.

Focal Length and a choice of fisheye models cover ultra-wide fields of view. Lens Effects add space curvature, perspective inversion and two authorable curves.

When to use it

ParameterTypeDefaultWhat it does
modeString"Free"Free: orbit/look freely (rotation drives aim). Target: lock the look-at onto a target point. FPS: WASD + mouse-look. One of: Free, Target, FPS.
positionVec3(0, 0, 5)Camera position in 3D space
rotationVec3(0, 0, 0)Orientation (pitch X, yaw Y, roll Z) in degrees
targetVec3(0, 0, 0)Look-at target position
projectionString"Perspective"Perspective: 3D depth. Orthographic: flat/2D, no depth foreshortening. One of: Perspective, Orthographic.
focal_lengthNumber28Focal length in mm (36mm full-frame equivalent). Lower = wider angle, higher = more telephoto.
lens_modelString"Rectilinear"Lens projection model. Rectilinear keeps straight lines straight. Fisheye models allow ultra-wide FOV with characteristic distortion. One of: Rectilinear, Equidistant Fisheye, Equisolid Fisheye, Stereographic Fisheye, Orthographic Fisheye.
curvatureNumber0Space curvature. Negative: hyperbolic (space expands at distance). Positive: spherical (space wraps, distant objects enlarged).
perspective_inversionNumber00: normal perspective. 0.5: orthographic-like. 1: reverse perspective (far objects appear larger).
magnification_curveCurve2D CurveDepth→scale curve. X: normalized depth (near→far). Y: scale multiplier (1 = normal, >1 far-bigger, <1 far-smaller). Leave unauthored for normal perspective.
lens_radial_curveCurve2D CurveCustom radial lens curve (X: normalized field angle, Y: normalized image radius). Bends rays through your own lens — real-time.
ortho_heightNumber10Viewport height in world units
near_clipNumber0.100Near clipping plane distance
far_clipNumber1000Far clipping plane distance
fps_speedNumber5Movement speed in world units per second
capture_widthNumber512Capture texture width in pixels
capture_heightNumber512Capture texture height in pixels

Gotchas

Rotation steers the camera in Free and FPS modes only. In Target mode the camera aims at the Target point and Rotation is hidden.

Curvature is a signed amount from -1 to 1, not a physical value. It is mapped so small movements near the middle give fine control and the ends reach a strongly bent look. Negative bends space outward (hyperbolic), positive wraps it, so distant objects enlarge.

The Magnification curve overrides Perspective Inversion whenever it has been authored (edited from its default flat line). Clear the curve to return to the slider.

The frustum guide drawn in the viewport reflects Perspective Inversion and the fisheye lens shape, but not a custom Magnification or Custom Lens curve. With either curve authored, the render is correct and the guide's frustum shape is not.

Worked example

  1. Add a Viewport Camera. Set Position and Rotation, or switch Mode to Target and set a look-at point, to frame the shot.

  2. Pick Perspective for normal depth or Orthographic for a flat view. Adjust Focal Length or Ortho Height to fit the scene in frame.

  3. For a wide establishing shot, switch Lens Model to one of the Fisheye options.

  4. Wire the Texture output into a Layer or Composite to use this camera's view as an image elsewhere in the graph.

  5. For a stylised look, open Lens Effects and dial in Curvature, or author the Magnification / Custom Lens curves. Edits update in real time.

See also

Render · Projection · Light · Rasters (images)