Game Development Reference
In-Depth Information
Field of View
Far
Clipping Plane
Near
Clipping Plane
Frustum
Figure 3-13. The frustum shown with the near clipping pane and far clipping pane
When the near clipping plane is smaller than the far clipping plane in Perspective mode, the rendered
scene gives a sense of diminishing perspective or a foreshortening effect, where objects and even
parts of objects appear smaller the farther away they are. This is the more common projection used
in 3D games. In Orthographic mode, the near and far clipping planes are the same size, causing
objects to be viewed in parallel by the camera. This mode is more common for 2D games, or 2D
layers of a game like the UI. In the Unity editor you can see the outline of the frustum in the Scene
view when the Main Camera is selected.
Field of View
The vertical viewing angle of the camera, measured along the local y axis in degrees.
Clipping Planes
Clipping Planes are perpendicular to the camera, delineating the top and bottom of the pyramid-like
frustum. Only objects between the clipping planes that fall within the volume of the frustum will
be rendered.
Viewport Rect
Ultimately the view of your game as seen by the camera is rendered onto the screen, which is
two-dimensional. The Viewport Rect is a normalized coordinate scale that defines the lower left
corner of the screen as (0, 0) and the upper right corner as (1, 1). Normalized means that no matter
what the actual screen size is, say on a monitor or a handheld device, (0, 0) is still the lower left of
the screen and (1, 1) is the upper right. It is used to designate the relative location on the screen
where the camera view is to be drawn.
Depth
As discussed previously in Clear Flags, when using multiple cameras Depth is where you designate
each camera's layer level, with the lowest value being the bottom, and so its view is rendered first.
 
Search WWH ::




Custom Search