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

ParameterTypeDefault
modeString"Free"
positionVec3(0, 0, 5)
rotationVec3(0, 0, 0)
targetVec3(0, 0, 0)
projectionString"Perspective"
focal_lengthNumber28
lens_modelString"Rectilinear"
curvatureNumber0
perspective_inversionNumber0
magnification_curveOneOf([Curve])Curve(Easing(BezierSpline { points: [...
lens_radial_curveOneOf([Curve])Curve(Easing(BezierSpline { points: [...
ortho_heightNumber10
near_clipNumber0.100
far_clipNumber1000
fps_speedNumber5
capture_widthNumber512
capture_heightNumber512

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)