Lighting

The Light in the game represents an object with luminous ability that can illuminate the surrounding environment. Adding light in the scene can make the scene produce the corresponding light and shadow effects, and get better visual effects.

light scene

Add Lights

There are two ways to add lights:

  • Click on the + button in the upper left corner of the Hierarchy panel, and select Light, then select the light type as needed to create a node containing the corresponding type of light component to the scene.

    add light

  • Select the node in the Hierarchy panel where you want to add the lights, then clicking the Add Component button below the Inspector panel and selecting Light.

    add light2

Physically-based Lighting

Cocos Creator uses optical measurement units to describe light source parameters. Based on optical measurement units, we can convert all relevant parameters of the light source into physical values in the real world. In this way, the designer can adjust the light intensity, color, range and other parameters according to the industrial standards of parameters and the physical parameters of a real environment. The overall lighting effect is more in line with the real natural environment.

For more information about the light and light parameters, please refer to the Physically-based Lighting.

Types of Light

For more information about light types, please refer to the following documentations: