Lumberyard
Legacy Reference

Using 3D Clouds

The 3D clouds effect use the Common Cloud shader, which uses gradient lighting for each vertex and takes the sun, cloud, and viewer positions into account. Gradient lighting interpolates between the bright color, which is calculated from the Sun color multiplier, and the dark color, which is calculated from the Sky color multiplier. For more information on sun and sky color parameters, see Adding Sky Effects.

In addition, rim lighting is also applied to each pixel to capture the effects of light scattering when clouds are backlit by the sun.

3D clouds use soft clipping to gradually fade in and out at the clipping planes. This prevents rendering artifacts for distant clouds as well as flickering due to cloud particles entering and leaving the view during a flythrough. Additionally, clouds blend softly against opaque scene geometry.

For best results, place 3D at a height greater than 1000 meters (Z value = 1000).

To create a 3D cloud

  1. In the Rollup Bar, under Objects, click Entity.

  2. Under Browser, select a suitable asset.

  3. Click No Custom Material.

  4. Under Shader Params, adjust parameter values as described in Common Cloud shader.

  5. Click Assign Item to Selected Objects and close Material Editor.

  6. Drag the cloud to the desired location in your level.

  7. Under Entity Properties, click CloudFile. Then click the folder icon.

  8. In Preview, click to select a cloud file.

  9. Click and adjust the values of the following parameters:

    • CloudFile – Sets the cloud material.

    • Scale – Sets the scale factor for sizing the cloud.

    • AutoMove – Select to enable cloud movement. Disable first before selecting a cloud to edit.

    • FadeDistance – Sets the distance from the edges of the SpaceLoopBox that the cloud fades in and out from.

    • SpaceLoopBox – Sets the size of the area that the cloud moves in from one end to the other.

    • Speed – Sets the speed at which the cloud moves. For normal clouds, use a value around 5. For storm clouds, use a value around 15.