Unity3d start from scratch (v): Understanding the Camera

Source: Internet
Author: User

1. Brief introduction
Unity's camera is used to present the game world to the player, with at least one camera in the game scene. can also have more than one.
2. Type
Two types of cameras are supported in unity, each of which is perspective (perspective) and orthographic (orthogonal).
3. Number of references
When you create a camera object in unity. In addition to the transform component, the camera, GUI layer, Flare layer, and audio listener components are also provided by default. 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. Assuming 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 regardless of color or depth cache. As a result, the results of each frame render are superimposed on the next frame. Typically used in conjunction with a shader of your own definition.
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 have been rendered and no skybox is specified.
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 (only for orthogonal mode).

This item controls the viewport size of the orthographic mode camera.
3.7 Clipping Planes
Clipping plane. The camera starts the distance between rendering and stopping rendering.


3.7.1 near
Near Point.

The camera starts to render the recent point.
3.7.2 Far
Away from the point. The farthest point the camera starts to render.
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
High-speed rendering.

The camera will render all of the game objects as one channel per material. Like the way it is rendered in unity2.x.


3.10.4 deferredlighting
Delay illumination. The camera first makes a non-illuminated rendering of the game object. Save the depth, light, and highlight intensity of the geometry with a buffer of screen space, and the resulting buffer will be used to calculate the light. Create a new light confidence buffer at the same time.

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. The human eye is more sensitive to the light intensity of the area. So using high dynamic range rendering can make the scene more realistic, and the light changes will not appear too abrupt.

Unity3d start 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.