Game Light Source
In 3D games, light sources are a distinctive game component. Used to improve the texture of the game. If no light source is added, the game scenario may become very dark. Three different types of light sources are provided in unity: Point Light Source, spotlight, and parallel light.
Point Light Source
As the name suggests, a lighting source emits light from a point to the surrounding area, just like a lamp. Create a light source Click Create -- point light in hierarchy view:
After the creation, click the dot light source object. All information about the dot light source is displayed in the Inspector view on the right:
Type: the type of the light source. Point, directional, and spot ).
Range: The impact range of illumination.
Color: The color of the light.
Intensity: the light intensity.
COOKIE: set the Alpha transparent channel of the texture. When you think of a point light source as a cube, you can set six of them with different brightness values. Therefore, only the cubemap type can be used for textures.
Shadow type: the shadow type projected by the light source.
Draw halo: whether to use the white fog effect in the light source.
Flare: Set the particle effect of the light source.
Render mode: Specifies the rendering mode of the light source.
Culling mask: Through the layer, you can set some maps not to be affected by illumination.
Lightmapping: Set the illumination map mode.
Spotlight
A spotlight emits a set of parallel light to the plane centered on another point as the starting point, and then shines in the plane as a ray, similar to a flashlight. Create a spotlight Click Create -- spot light in hierarchy view:
After the spotlight object is created, click the spotlight object to view all the information about the spotlight in the Inspector view on the right:
Compared with the point light source, the spot light parameter only has one spot angle, which is used to adjust the illumination range of the ray.
Parallel Light
The radiation range of parallel light is very large, which can illuminate the entire game world. Like the sun in nature. In the gaming world, parallel light must be set for outdoor scenarios. When using parallel light, you need to rotate the angle of the radiation to the world.
After the object is created, click the parallel light object to view all the information of the parallel light in the Inspector view on the right:
The property is as above.