Back

Cameras

Cameras define how the scene is viewed in the screen, as every other object they have a position and rotation, and can control where to draw content on the screen and can have post-processing effects attached.

A scene can use multiple cameras at the same time, camera have a draw order preference attached to them, used to decide which one to render from first. Cameras can be added from the object add bar.

Perspective Camera

A perspective camera is used to draw objects with a perspective projection. A perspective projection is a 3D where depth can be easily perceived by the used.

In perspective cameras the following parameters can be configured:

Orthographic Camera

Orthographic cameras are used to draw object with a orthographic projection. A orthographic proection is a 2D projection where its impossible for the used to perceive distance, objects far away from the camera appear to have the same size as the ones closest to it.

In orthographic cameras the following parameters can be configured:

Comparison

In the demo bellow we can see booth a perspective camera (on the left) and a orthographic camera (on the right) in action.

To try this example in the editor you can download the project file or open it on the Web Editor.

Viewport

The zone on the screen where the camera draws can be controlled using the viewport attributes. This allows for multiple cameras to be displayed at the same time on one screen.

In the example bellow the booth cameras have a viewport of (1.0, 0.5) this means that the cameras ocupy 100% of the screen in the horizontal and half the screen in the vertical. And position for the camera on the bottom (0,0), and (0, 0.5) for the top camera. These positions are relative to the bottom left corner of the viewports. The bottom camera start on the bottom left of the screen and the top camera starts at 50% of the vertical size of the screen.

To try this example in the editor you can download the project file or open it on the Web Editor.

Cube Camera

Cube cameras are composed of 6 internal perspective cameras aligned to capture an entire 360 projection of the scene.

These type of cameras can be added from the object bar, and can be programmatically attached to the scene (as background) or to materials (as environment map) and are used essencially to create reflection/refraction effects.