Shadow

In the 3D world, light and shadows have always been extremely important components. They can enrich the entire environment, good-quality shadows can achieve the effect of false realization, and make the entire world have a three-dimensional feel to it.

Here is an example of a shadow from Cocos Creator 3D: shadow

Turning on shadows

Cococs Creator 3D currently supports the highly efficient Planar Shadow. More Shadow types will be available later.

It only takes two steps to enable a Planar Shadow in Cococs Creator 3D:

  1. Select the Scene node on the level manager, you can see the following panel, check the Enabled property of planarShadows. location of planar shadow

  2. Set ShadowCastingMode to ON in the model that needs to display shadows. ShadowCastingModes property

    Note: Planar Shadow will only be cast on the shadow surface. Adjusting the directional light angle can adjust the shadow projection.

PlanarShadows panel

planar shadow panel details

The following describes all the properties of the panel:

Properties Explanation
enabled whether to enable planar shadows
normal normals to vertical and shadow planes
distance the distance of the shadow plane from the coordinate origin in the direction of the normal
shadowColor color value of the resulting shadow

Continue to the Ambient Light documentation.

results matching ""

    No results matching ""