Skip to content

Search

Назад
· 1 хв читання

Camera lens

camera3d takes kiss3d's lens: field of view, clip planes, orthographic projection, render layers and a stereo pair.

A camera3d carries kiss3d's lens: how it projects, what it draws, and whether it draws two eyes. Its node alone moves it.

One scene four ways: fov_degrees 25, fov_degrees 90, orthographic, and render_layers hiding the blue box

  • fov_degrees, near and far set the lens. projection = "orthographic" keeps parallel lines parallel, orthographic_height high or sized from the distance to the point looked at.
  • render_layers is a bitmask. A camera draws a shape3d, mesh or multimesh3d whose own render_layers share a bit with it.
  • No mouse or key moves a camera. The editor library's Orbit camera and First person rigs are scripts that move one, which a game can read and change.
  • With no current camera the defaults come back, so a game's lens ends when its play in the editor stops.
  • eye_separation above 0 makes the camera a stereo pair: one eye in each half of the frame, both converging on the point looked at.

A stereo camera's two halves: the same cube seen from two eyes a world unit apart

[nodes.camera3d]
look_at = [0.0, 0.0, 0.0]
fov_degrees = 25.0
projection = "perspective"
render_layers = 1