π«οΈ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:
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
Last updated