Page cover image

🌫️The Fog Dome

Overview

95% of COZY aesthetic style comes from its robust fog system. Instead of a simple exponential or linear fog, COZY uses a 5 stage gradient based fog. What this means is that COZY's fog density is not determined by a single mathematic function, but rather remaps the camera's clipping distance to a gradient allowing you to define up to five color and opacity nodes.

5 Stages of Color

COZY's fog is defined by 4 transition positions that define transitions between 5 color swatches. By default, the transitions happen at 2, 5, 10, and 30 fog units. Fog units are in meters at a fog density of 1, however as the fog density increases, the fog units will condense closer to each other. The fog will start with Fog Color 1 right in front of the camera and then immediately begin transitioning to Fog Color 2. At the position of Fog Start 1, the fog color will be completely shifted to fog color 2.

Here is an exaggerated example of the fog for better understanding of how this works visually:

Visual example of how the fog colors and transitions function

You can also set opacities for each of the keys to impact the density of the fog at the same location as the color key.

Sun Flare

The fog also has a modifier that adds a color around the area of the sun in the sky. You can use this to add dynamic sunsets with a bright glow of sunlight slowly turning to dark night colors opposite the sun.

Control the color, intensity, squish, and falloff for more influence over the flare style. Intensity controls the weight of the flare - color determines the actual brightness of the flare. Falloff determines the falloff of the fog's flare. Squish refers to the amount that the light flare is condensed down to only impact the horizon.

Variation

In COZY 3, the fog now has a simple 2D variation that impacts the density of the atmosphere. This allows for subtle changes in the fog that create visual interest and depth in you world. The variation does not only affect the opacity; it also changes the color of the fog, lowering the key value. In a situation where the fog moves from brown to red over the distance, pockets of variation would also move to a browner color.

How to Change the Fog Style

In the Options tab of the Settings module, change the value of the Fog Style enum to change the current cloud type.

Then select your fog type from the enum:

Fog Styles

Stylized Fog

The Stylized Fog is the default fog style in COZY: Weather. Uses screenspace height for density control.

Height Fog

The Height Fog is very similar to Stylized Fog in the distance. In the foreground however, Height Fog uses the world height for fog density instead of screenspace height allowing more visibility in the air around the player. If you are using the Plume Module this fog type will give you the best result.

Stepped Fog

Uses the same algorithm as the Stylized Fog type but instead of smooth transitions, Stepped Fog has discrete transitions. This gives your fog a stepped, static look to it that works well with more stylized and cartoony worlds.

Parameters

Name
Type
Description

Fog Color 1

Gradient / Color

Defines the color and alpha of the fog at the camera

Fog Color 2

Gradient / Color

Defines the color and alpha of the fog at the distance determined by Fog Start 2

Fog Color 3

Gradient / Color

Defines the color and alpha of the fog at the distance determined by Fog Start 3

Fog Color 4

Gradient / Color

Defines the color and alpha of the fog at the distance determined by Fog Start 4

Fog Color 5

Gradient / Color

Defines the color and alpha of the fog at the distance determined by Fog Start 5

Fog Start 2

Float / Curve

Determines the distance that the fog will be the second color

Fog Start 3

Float / Curve

Determines the distance that the fog will be the third color

Fog Start 4

Float / Curve

Determines the distance that the fog will be the fourth color

Fog Start 5

Float / Curve

Determines the distance that the fog will be the fifth color

Fog Height

Float / Curve

Determines how much of the screen will be covered in fog

Fog Smoothness

Float / Curve

(0-1) Controls how smooth the height transition is for the fog

Fog Density Multiplier

Float / Curve

(0-5) Global multiplier for the fog density

Light Flare Color

Color / Gradient

Controls the color of the fog's sun flare

Moon Flare Color

Color / Gradient

Controls the color of the fog's moon flare

Light Flare Intensity

Float / Curve

Control the brightness of the sun flare

Light Flare Falloff

Float / Curve

Controls how quickly the light spill disperses

Light Flare Squish

Float / Curve

Flattens the light flare to the horizon

Fog Variation Direction

Vector 3

XZ - determines the scroll direction and speed for the variation texture

Fog Variation Scale

Float / Curve

Determines the scale of the variation texture

Fog Variation Amount

Float / Curve

Controls how much variation is applied to the fog by the variation texture

Fog Variation Distance

Float / Curve

Controls how far into the fog variation is visible

Last updated

Was this helpful?