[Unity 3D] Study Notes: game elements-game Light Source

Source: Internet
Author: User

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.

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.