Lumberyard
User Guide (Version 1.15)

Setting Global (Time of Day) Fog

You can use global fog to simulate particles that are distributed uniformly along the ground and fall off exponentially with height above sea level. Global fog accurately accounts for time of day lighting and for scattered sunlight rays to produce haze at the horizon and halos around the sun. You can also use this effect to cast shadows for objects and clouds through the fog.

To set global fog parameters

  1. In Lumberyard Editor, click Tools, Other, Time Of Day.

  2. In the Time of Day Tasks pane, under Tasks, click Toggle Advanced Properties to view all parameters.

  3. In the Parameters pane, under Fog, adjust the following parameters as needed:

    Parameter Description
    Color (bottom) Specifies the bottom color for the fog.
    Color (bottom) multiplier Specifies the intensity of the bottom fog color. This value is multiplied by the top fog color to set the brightness of the bottom fog color. You can set this value to 3 for midday and add three keys to the timeline with the values set at 0.02. This creates a localized orange bloom around the sun as it descends.
    Height (bottom) Specifies a reference height for the vertical fog gradient. This is the height at which the fog color reaches the specified color at the top. For fog density, this value is the height at which the vertical density falloff reaches the specified density.
    Density (bottom) Specifies the fog density at the bottom. Values greater than 0 or less than 1 cause the fog to gradually fall off.
    Color (top) Specifies the color of the fog component that produces halos around the sun and sunlight scatter.
    Color (top) multiplier Specifies the intensity of the top fog color. This value is multiplied by the bottom fog color to set the brightness of the top fog color.
    Height (top) Sets the reference height for the vertical fog gradient. For fog color, this value is the height at which the specified color reaches at the top. For fog density, this value is the height at which the vertical density falloff reaches the specified density.
    Density (top) Specifies the fog density at the top. You can set the top density to a higher value than the bottom density. Doing so would reverse the vertical falloff and produce thick fog in the sky and clear views at the bottom. You can also set the top and bottom density values to be equal.

    Volumetric fog computations treat a level as a continuous unbound volume. If you specify a density greater than 0 at the specified top height, the fog won't suddenly stop at that height. Instead the fog will continue to fall off gradually. The same action is true for bottom boundary or density values that are less than 1.

    Color height offset Offsets the height of the vertical fog gradient between the top and bottom colors.
    Color (radial) multiplier Specifies the multiplier of the fog color component that produces halos around the sun and sunlight scatter. Radial fog is more noticeable as the light intensity decreases, so you can decrease the multiplier towards the end of the timeline. Radial fog is also applied to the moon at night, so you can create two keys on the timeline and set the value to 0.
    Radial size Specifies the size of the radial fog glow (bloom around the sun), perpendicular to the camera. This value can also enhance effects such as the colors around the sun at sunrise or sunset.
    Radial lobe Specifies the size of the radial fog glow towards the camera or how much the radial fog is affected by distance. Higher values create a foggier scene. Lower values affect only the horizon.
    Final density clamp Sets the maximum density that the fog can reach. This enables the sky, horizon, and other bright, distant objects to be visible through dense fog. Setting this value too low can compromise depth perception and result in implausible visuals and apparent artifacts, especially when moving the camera.
    Global density Sets the density of the global fog. Higher values create denser fog.
    Ramp start Specifies the distance from the camera at which the fog starts to render at 0 density. This allows you to remove the fog around the camera and fade in at a specified distance.
    Ramp end Specifies the distance from the camera at which the fog ceases to render at 0 density. This allows you to remove the fog around the camera and fade out at a specified distance.
    Ramp influence Specifies how much the ramp values affect the rendering of the fog.
    Shadow darkening Controls the appearance of the fog in shadow areas. Specifies how much the fog color is darkened per pixel based on the volumetric shadow value per pixel. This value is applied after calculating the darkened fog color using the sun and ambient darkening factor. See the next two parameters.
    Shadow darkening sun Specifies how much the sun influences the radial fog color.
    Shadow darkening ambient Specifies how much the environment influences the ambient fog color height gradient.
    Shadow range Sets the distance that the volumetric shadows are rendered until 10% (0.1) of the level's clipping plane distance is reached. Lower values produce more accurate results; however, the shadows are not rendered as far as with higher values.