OrthographicCamera, PerspectiveCamera, ArrayCamera, CubeCamera, StereoCamera OrthographicCamera and PerspectiveCamera are introduced below.

Orthographic and perspective projection

To understand orthonormal cameras and perspective cameras, let’s take a look at orthography and perspective projection. Orthoprojection means that the size of the object in the final rendered image remains unchanged regardless of its distance from the camera. Perspective projection belongs to central projection, which is a graph obtained by projecting an object onto a single projection plane from a projection center and simulates the scene seen by human eyes.

OrthographicCamera OrthographicCamera

OrthographicCamera is used for 2D scene rendering.

OrthographicCamera(left: Number, right: Number, top: Number, bottom: Number, near: Number, far: Number) OrthographicCamera(left: Number, right: Number, top: Number, bottom: Number, near: Number, far: Number)

  • Left, right, top, bottom: the first four parameters are left, right, top, bottom. The default values are -1, 1, 1, -1

  • Near: near section, usually a very small value, 0.1 by default

  • Far: the object can only be seen between the near and far sections. If the far section is too small, the complete scene cannot be seen. The default value of the far section is 2000

PerspectiveCamera PerspectiveCamera

PerspectiveCamera for 3D scene rendering.

PerspectiveCamera(fov: Number, aspect: Number, near: Number, far: Number) PerspectiveCamera(fov: Number, aspect: Number, near: Number, far: Number)

  • Fov: Field of view of the virtual camera. The field of view of the virtual camera refers to the area visible on the screen in the 3D world. The default value is 50

  • Aspect: aspect ratio, which defaults to 1 and is typically set to the screen aspect ratio, window.innerWidth/window.innerheight

  • Near, far: near and far cross section, same as near and far of OrthographicCamera

Other camera

ArrayCamera is an array of PerspectiveCamera for rendering VR scenes. CubeCamera PerspectiveCamera is 6 PerspectiveCamera cube cameras (up, down, left, right, front, back); StereoCamera is a dual-perspective camera that simulates the visual difference of people’s eyes and is used for 3D stereoscopic imaging. Through the PerspectiveCamera, we can see a 2D plane effect, while StereoCamera provides a real 3D effect.

You can better understand the different effects of various cameras by looking at official examples.