Unity3d starting from scratch (V): Understanding the Camera

Source: Internet
Author: User

1. Introduction
Unity's camera is used to present the game world to the player, with at least one camera in the game scene or multiple units.
2. Type
Two types of cameras are supported in unity, namely perspective (Perspective) and orthographic (orthogonal).
3. Parameters
When you create a camera object in unity, by default the transform component will also have a camera, GUI layer, Flare layer, and audio listener component. The following describes the parameters of the next camera component.
3.1 Clear Flags
Clears the tag. Determines which part of the screen will be cleared. This is typically used to depict different game objects using multiple cameras, with 3 modes:
3.1.1 Skybox
Sky Box. This mode is the default setting. A blank section of the screen displays the Sky box for the current camera. If the current camera does not have a sky box set, it will use the background color by default.
3.1.2 Solid Color
Solid color. Selecting the blank portion of the Mode screen displays the background color of the current camera.
3.1.3 Depth only
Depth only. This mode is used when the game object does not want to be cropped.
3.1.4 Don ' t Clear
Do not clear. This mode does not clear any color or depth caches. As a result, the results of each frame render are superimposed on the next frame. Typically used in conjunction with custom shader.
3.2 Background
Background. This item is used to set the background color. Applies the set color to the blank space of the screen when all the elements in the lens are rendered complete without specifying skybox.
3.3 Culing Mask Culling mask. Controls the game objects rendered by the camera according to the layer specified by the game object.
3.4 Projection
Projection mode. There are two kinds
3.4.1 Perspective
Perspective. The camera will render the game object in a perspective way.
3.4.2 orthographic
Orthogonal. The camera will render the game object evenly in a non-perspective manner.
3.5 Field of view
View range (only for perspective mode). This is used to control the camera's angle of view width, as well as the longitudinal angle dimensions.
3.6 Size
Size (orthogonal mode only). This item controls the viewport size of the orthographic mode camera.
3.7 Clipping Planes
Clipping plane. The distance between the camera start rendering and the stop rendering.
3.7.1 near
Near Point. The nearest point at which the camera starts rendering.
3.7.2 Far
Away from the point. The farthest point at which the camera starts rendering.
3.8 Viewport Rect
The standard view rectangle. Using four values to control the view of the camera will be drawn on the screen location and size, the item using the screen coordinate system, the value between 0~1.
3.8.1 X
The horizontal position starting point for the camera view to draw.
3.8.2 Y
The vertical position starting point for the camera view to draw.
3.8.1 W
The camera view is drawn to the width on the screen.
3.8.1 H
The camera view is drawn to the height on the screen.
3.9 Depth
Depth. This is used to control the camera's rendering order, and larger cameras will be rendered over smaller cameras.
3.10 Rendering Path
The render path. This item is used to specify the rendering method for the camera.
3.10.1 Use Player Settings
Use the settings in Project Settings->player. The camera will use the render path set.
3.10.2 Vertex Lit
Vertex illumination. The camera renders the game object as a vertex light object.
3.10.3 Forward
Fast rendering. The camera will render all of the game objects in one channel per material, as if they were rendered in unity2.x.
3.10.4 deferredlighting
Delay illumination. The camera first makes a non-illuminated rendering of the game object, using buffer of screen space to preserve the depth, light, and intensity of the geometry, and the resulting buffer will be used to calculate the light and generate a new light confidence buffer. Finally, all the game objects will be rendered again, overlay the contents of the light information buffer when rendering.
3.11 Target Texture
The target texture. This item is used to output and render the camera view to the screen. Generally used for the production of navigation map or picture in the picture and other effects.
3.12 HDR
High dynamic illumination rendering. This item is used to enable the camera's high dynamic range rendering capability. Because the human eye is more sensitive to the light intensity of the area, the use of high dynamic range rendering can make the scene more realistic, and the illumination changes will not be too abrupt.

Unity3d starting from scratch (V): Understanding the Camera

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.