Camera
The Camera‘s visual range is composed of 6 planes forming a Frustum, a Near Plane, and a Far Plane to control the visible distance and range of near and far distance, at the same time, they also constitute the size of the viewport.
To use , please refer to the Camera API.
The Camera Component is an important functional component that we use to present a Scene.
Camera group rendering
The Camera and models provided by default are all rendered without grouping. You do not need to change this value if the game has no special requirements to do so.
The Visibility
property is used to set which layers of nodes should be observed by the camera, and multiple Layers can be selected at the same time.
When you check multiple Layers in the Visibility
property, the value of the Visibility
property is calculated by performing a |
operation on the property values of multiple Layers.
For example, in the following image, the Visibility
property of the camera has both UI_3D and DEFAULT Layer checked, and by looking up the value of the Layer property, notice the value of the UI_3D property is 1 << 23 , the value of the DEFAULT property is 1 << 30, and the value of the Visibility
property is 1 << 23 | 1 << 30 = 1082130432.
The property allows multiple Layers to be selected at the same time, while the Layer
on the Node has its own value, so the Visibility
property of the camera is an 232 bit integer. Each visible Layer occupies one bit, using bitwise operations, and supports up to 32 different Layer labels (one bit for each Layer value, that is, represented by 232). When the camera is culling, the Layer’s property value of each node will perform a &
operation with the camera, and if the Visibility
property of the camera contains this Layer
, then the current node will be visible to the camera, and vice versa.
Aperture, Shutter, Iso: These three parameters of Camera will determine the amount of incoming light, which in turn affects the exposure value. Only takes effect if the scene has HDR turned on. The algorithm is usually as follows:
ev = log 2 (ApertureValue2 / ShutterValue*k / IsoValue)
ApertureValue
, and IsoValue
are obtained by looking up the enumeration values of the three attributes Aperture, Shutter, Iso. Where k is a cosntant.
The following images demonstrate the effect of exposure on a scene:
To enable scene HDR, please refer to .