Environmental Lighting and Weather
The environmental lighting configuration determines how the map is illuminated at every time of day. The sun position, ambient light color, shadow distance, and fog properties combine to define the map's visual atmosphere. The weather configuration defines which precipitation events can occur, how intense they are, and how they modify the lighting during the event. A map with well-configured lighting looks visually coherent at dawn, midday, dusk, and midnight. A map with poorly configured lighting appears flat at all times of day, with washed-out colors or impenetrable shadows that obscure gameplay.
This article is a procedural tutorial covering every environmental lighting and weather configuration option available in the Unturned™ Level Editor. It describes the Lighting panel interface, the sun angle editor, ambient color configuration, shadow distance and quality settings, fog color and density control, the weather scheduling system, per-weather-type configuration for rain and snow, wind zone configuration, and the failure modes that produce incorrect lighting or weather behavior in-game. The article assumes the reader has completed the road placement workflow in the preceding article and is familiar with the Level Editor panel system.

Prerequisites
- A map with completed terrain, foliage, and road placement. The editor must be open and the map must have terrain data initialized.
- Familiarity with the editor toolbar, viewport navigation, and the Lighting panel location.
- A set of weather assets available in the map's master bundle or in the vanilla asset library. The vanilla game ships standard rain, snow, and fog weather assets.
- Understanding of the day-night cycle and how time of day affects gameplay.
What you will learn
- How to open the Lighting panel and navigate its sections.
- How to configure sun angle and rotation for different times of day.
- How ambient color affects overall scene illumination and how to choose appropriate values.
- How to set shadow distance, shadow resolution, and shadow cascade count.
- How fog color and density control distance-based visibility.
- How to configure weather schedules for rain, snow, and custom weather events.
- How per-weather-type settings modify fog, wind, and lighting during weather events.
- How to diagnose and resolve overnight lighting issues and shadow flickering.
Background: how lighting and weather interact
The environmental lighting system and the weather system are separate but interdependent. The lighting system defines the baseline illumination of the map based on the sun position and ambient color. The weather system can override specific lighting properties (fog color, fog density, shadow strength) when a weather event is active. At any given moment, the player sees either the baseline lighting or the weather-modified lighting, depending on whether a weather event is active.
As shown in the flowchart above, weather events sit on top of the baseline lighting configuration and can override specific rendering properties. The baseline lighting must be configured first; the weather overrides modify the baseline only while the weather is active.
The Lighting panel
The Lighting panel is the primary interface for all environmental lighting configuration.
Opening the Lighting panel
Click the Lighting icon on the Level Editor toolbar. The icon depicts a sun or light bulb. The Lighting panel opens on the right side of the editor interface.
Panel sections
The Lighting panel is organized into several collapsible sections:
| Section | Contents | Purpose |
|---|---|---|
| Sun Direction | Sun disc editor, Pitch and Yaw numeric fields | Controls the directional light angle |
| Ambient Color | RGB color picker with numeric float fields | Controls base illumination level |
| Shadow Configuration | Shadow Distance, Resolution, Cascade dropdowns | Controls shadow rendering quality |
| Fog Configuration | Fog Color picker, Fog Density, Fog Intensity | Controls distance-based fog |
| Time of Day | Color fields for Dawn, Midday, Dusk, Midnight | Controls lighting color at each time of day |
Sun angle and rotation
The sun is the map's primary directional light source. Its position determines the direction of all cast shadows and the overall illumination color.
Configuring the sun position
Step 1: Open the Lighting panel.
Step 2: Locate the Sun Direction section. The sun position is represented by a draggable sun disc in a circular editor widget.
Step 3: Click and drag the sun disc within the widget. The disc moves to a new position on the widget, and the viewport updates the directional light angle in real time.
Step 4: Alternatively, set the sun position numerically using the Pitch and Yaw fields below the sun disc:
| Field | Description | Range |
|---|---|---|
| Sun Pitch | The angle of the sun above the horizon | -90 (below horizon) to 90 (directly overhead) |
| Sun Yaw | The compass direction of the sun | 0 (east), 90 (north), 180 (west), 270 (south) |
On-screen appearance: The sun disc moves on the circular widget as the Pitch and Yaw values change. The viewport updates to show the new shadow directions across the terrain and objects. The sun's position in the sky (visible as a bright disc in the skybox) moves to match the configured angle.
Sun angle recommendations by time of day
| Time of day | Pitch angle | Yaw angle | Visual effect |
|---|---|---|---|
| Dawn | 5-15 degrees | 45-90 (northeast) | Long shadows, warm golden light, cool ambient |
| Midday | 60-80 degrees | 180 (south) | Short shadows directly under objects, bright light |
| Dusk | 5-15 degrees | 225-270 (northwest) | Long shadows, warm orange light, cool ambient |
| Night | -30 to -10 degrees | 180 (south) | No direct sunlight, only ambient and moonlight |
The Pitch angle determines the height of the sun in the sky. A Pitch of 45 degrees produces a standard midday appearance with medium-length shadows. A Pitch of 10 degrees produces long shadows appropriate for early morning or late evening.
Ambient color
The ambient color is the base illumination level applied to all geometry regardless of direct sunlight. It prevents shadows from being completely black and provides visibility in areas that are not directly lit by the sun.
Configuring ambient color
Step 1: In the Lighting panel, locate the Ambient Color section.
Step 2: Click the color swatch to open the color picker. The color is expressed as three RGB float values in 0-1 range.
Step 3: Set the ambient color. The cohort-recommended starting point for a standard survival map is RGB 0.15, 0.15, 0.18 (a neutral dark blue-gray).
Step 4: Observe the viewport. The ambient color change is subtle but visible: shadow areas become lighter or darker depending on the values.
Ambient color guidelines
| Map atmosphere | Ambient R | Ambient G | Ambient B | Effect |
|---|---|---|---|---|
| Standard survival | 0.15 | 0.15 | 0.18 | Neutral dark ambient, good contrast |
| Bright sunny map | 0.25 | 0.25 | 0.3 | Brighter shadows, less contrast |
| Horror map | 0.08 | 0.06 | 0.1 | Very dark ambient, deep shadows |
| Desert map | 0.2 | 0.18 | 0.12 | Warm ambient matching sandy environment |
| Snow map | 0.25 | 0.25 | 0.3 | Bright ambient reflecting snow cover |
The ambient color should be a desaturated version of the sky color at midday. A cool blue-gray ambient is the safest default for most map types because it provides neutral illumination that does not introduce an unwanted color cast.
Shadow distance and quality
The shadow configuration controls how far from the camera shadows are rendered and at what quality.
Shadow distance
Step 1: In the Lighting panel, locate the Shadow Distance numeric field.
Step 2: Adjust the value. The distance is measured in world units from the camera position.
| Map size | Recommended shadow distance | Rationale |
|---|---|---|
| Small | 100-150 units | Short distances are sufficient; longer distances degrade performance |
| Medium | 150-200 units | Balances shadow coverage with performance |
| Large | 100-150 units | Reduced distance to maintain frame rate on larger view distances |
| Insane | 80-120 units | Maximum performance priority; shadows at extreme distance are not noticeable |
On-screen appearance: Shadows in the viewport disappear gradually beyond the configured distance. The transition is not a hard cutoff; the shadow rendering fades out over the last 20-30 units.
Shadow resolution and cascades
Step 1: Locate the Shadow Resolution dropdown in the Lighting panel.
Step 2: Select a resolution. Available options are Low, Medium, High, and Very High.
| Resolution | Quality | Performance cost |
|---|---|---|
| Low | Blocky shadow edges, visible aliasing | Lowest cost |
| Medium | Acceptable shadow quality for most maps | Moderate cost |
| High | Sharp shadow edges, minimal aliasing | Higher cost |
| Very High | Maximum shadow detail | Highest cost; only for high-end hardware |
Step 3: Locate the Shadow Cascades dropdown. Cascades split the shadow frustum into multiple sections, each with its own shadow map resolution.
| Cascade count | Behavior | Recommended for |
|---|---|---|
| 1 cascade | Single shadow map for the entire frustum | Small maps, performance-critical maps |
| 2 cascades | Two splits: near and far | Medium maps, standard quality |
| 4 cascades | Four splits: very near, near, mid, far | Large maps with varied terrain elevation |
The cohort recommendation for most maps is High shadow resolution with 2 cascades. Upgrade to Very High and 4 cascades only on maps where shadow quality is a priority and the target hardware can sustain the performance cost.
Fog color and density
Fog provides distance-based visibility falloff and atmospheric depth. The fog color and density are configured in the Lighting panel.
Configuring fog
Step 1: In the Lighting panel, expand the Fog Configuration section.
Step 2: Locate the Fog Color swatch. Click to open the color picker and select a fog color.
Step 3: Locate the Fog Density numeric field. This value controls how quickly visibility falls off with distance from the camera.
Step 4: Locate the Fog Intensity numeric field. This value controls the maximum fog opacity at far distances.
Fog color recommendations
| Map atmosphere | Fog color (R G B) | Fog Density | Fog Intensity |
|---|---|---|---|
| Clear day | 0.6 0.7 0.8 | 0.003 | 0.02 |
| Overcast | 0.5 0.55 0.6 | 0.005 | 0.04 |
| Foggy morning | 0.7 0.7 0.75 | 0.01 | 0.06 |
| Dusty desert | 0.6 0.55 0.45 | 0.008 | 0.05 |
| Arctic snow | 0.75 0.78 0.8 | 0.004 | 0.03 |
| Horror / night | 0.05 0.05 0.08 | 0.015 | 0.08 |
The fog color should match the sky color at the dominant time of day. A clear day should have blue-gray fog matching the sky. A dusty desert should have tan-brown fog matching the environment.
On-screen appearance of fog
Fog in the viewport appears as a color overlay at distance. Near the camera (within approximately 50 units for standard fog density), the fog is invisible. Beyond this distance, the fog increases in opacity until it reaches the maximum intensity at the far clip plane. The fog color blends with the terrain and object colors, producing a distance-based desaturation effect.
Weather configuration
Weather events are configured through the Level Settings panel, which manages the list of eligible weather types and their scheduling.
Opening weather configuration
Step 1: Click the gear icon on the toolbar to open the Level Settings panel.
Step 2: Navigate to the Weather section. The section displays the current list of weather types assigned to the map.
Adding a weather type
Step 1: In the Weather section, click Add Weather Type. A new weather entry appears in the list.
Step 2: Configure the weather entry's fields:
| Field | Description | Cohort starting point for rain |
|---|---|---|
| Asset | The weather asset that defines the weather's visual and gameplay behavior | Weather_Rain |
| Min_Frequency | The minimum number of in-game days before the weather can occur again | 1 |
| Max_Frequency | The maximum number of in-game days before the weather can occur again | 3 |
| Min_Duration | The minimum number of in-game days the weather event lasts | 1 |
| Max_Duration | The maximum number of in-game days the weather event lasts | 2 |
Step 3: Repeat steps 1-2 for each additional weather type (snow, fog, custom weather events).
On-screen appearance: The Weather section shows a list of weather entries. Each entry displays the weather asset name, the frequency range, and the duration range. The list can be reordered by dragging entries vertically.
Configuring multiple weather types
The cohort recommendation for a standard survival map is to include rain and fog weather types with distinct scheduling:
| Weather type | Min_Frequency | Max_Frequency | Min_Duration | Max_Duration |
|---|---|---|---|---|
| Rain | 1 | 3 | 1 | 2 |
| Fog | 2 | 5 | 1 | 1 |
| Snow (winter maps) | 2 | 4 | 1 | 3 |
| Thunderstorm (optional) | 4 | 7 | 1 | 1 |
Weather types with overlapping frequency ranges can occur on consecutive days. The engine selects the next weather event based on the configured frequencies and durations.
Removing a weather type
Step 1: In the Weather section, locate the weather entry to remove.
Step 2: Click the Remove button (X icon) on the weather entry row. The entry is removed from the list.
Step 3: Save the level. The removed weather type no longer occurs naturally on the map.
Per-weather-type configuration
Each weather asset defines its own visual and gameplay properties. The key fields that affect lighting and atmosphere are:
Fog override
When a weather event overrides the fog, it replaces the baseline fog color and density with the weather's configured values.
| Field | Effect |
|---|---|
Override_Fog | If true, the weather's fog color and density replace the baseline fog |
Fog_Color | The color of the fog during the weather event |
Fog_Density | The density of the fog during the weather event (0-1 range) |
Fog_Blend_Exponent | The power applied to fog blending alpha; higher values produce sharper fog edges |
Cloud_Blend_Exponent | The power applied to cloud blending alpha; higher values produce sharper cloud edges |
Shadow strength multiplier
| Field | Effect |
|---|---|
Shadow_Strength_Multiplier | Directional light shadow strength is multiplied by this value during the weather event. A value of 0.5 reduces shadow intensity by half; a value of 0 removes shadows entirely |
Wind
| Field | Effect |
|---|---|
Wind_Main | The wind zone's main wind speed value during the weather event. Affects foliage animation and particle systems |
Time of day colors
Weather assets can define different fog colors for each of the four main times of day:
| Time of day | Typical time | Purpose |
|---|---|---|
| Dawn | Early morning | Cool low-angle light; fog tends toward blue or purple |
| Midday | Noon | Bright overhead light; fog tends toward bright white or blue |
| Dusk | Evening | Warm low-angle light; fog tends toward orange or red |
| Midnight | Night | Dark minimal light; fog tends toward dark blue or black |
If a time-of-day block is not specified in the weather asset, the game uses the default fog color from the map's lighting configuration for that time of day.
Step-by-step: configuring rain weather
Step 1: Open the Level Settings panel and navigate to the Weather section.
Step 2: Click Add Weather Type. A new weather entry is added to the list.
Step 3: Click the Asset selector button and browse to the vanilla rain weather asset. The asset is named Weather_Rain and is located in the vanilla bundles.
Step 4: Configure the frequency and duration fields:
| Field | Value |
|---|---|
| Min_Frequency | 1 |
| Max_Frequency | 3 |
| Min_Duration | 1 |
| Max_Duration | 2 |
Step 5: Save the level.
Step 6: Launch the map in single-player and wait for the rain weather to occur naturally. Use the in-game /weather command with the rain weather asset's GUID to trigger it manually for immediate testing: /weather <Weather_Rain_GUID>.
On-screen appearance in-game: When rain is active, the sky becomes overcast and darker. Rain particles fall from the sky, creating a precipitation effect. The fog may increase in density depending on the weather asset configuration. The ground surface becomes wet-looking if the weather asset includes wetness effects.
Step-by-step: configuring snow weather
Step 1: Open the Level Settings panel and navigate to the Weather section.
Step 2: Click Add Weather Type.
Step 3: Select the snow weather asset from the asset browser. The asset is typically named Weather_Snow.
Step 4: Configure the frequency and duration fields. Snow should occur less frequently than rain in most maps:
| Field | Cohort starting point |
|---|---|
| Min_Frequency | 2 |
| Max_Frequency | 5 |
| Min_Duration | 1 |
| Max_Duration | 3 |
Step 5: Save the level and test in single-player.
On-screen appearance in-game: When snow is active, snow particles fall from the sky. The fog color may shift to a cooler, brighter color. The ground surface may accumulate snow if the weather asset includes ground cover effects.
Seasonal weather and perpetual weather
Setting perpetual weather
Step 1: In the Level Settings panel, locate the Perpetual_Weather_Asset field.
Step 2: Set the field to the GUID of a weather asset. The specified weather is always active on the map.
Step 3: The perpetual weather does not fade in or out; it is active from the moment the map loads.
Perpetual weather is useful for maps with a permanent atmospheric condition: a perpetually foggy swamp map, a perpetually snowy arctic map, or a perpetually dusty desert map.
Failure mode: map too dark at noon
A map that appears unreasonably dark during midday hours (when the sun should be at its brightest) has insufficient ambient light or incorrect sun intensity.
What it looks like: At in-game noon, outdoor areas are dim. Shadows are deep and obscure terrain detail. Indoor areas are nearly black. The map does not feel like daylight.
Root cause: The ambient color values are too low, or the sun's Pitch angle is too shallow for a midday position.
Resolution steps:
Step 1: Increase the ambient color values by 0.05 increments for each RGB channel. Test after each increment. The ambient should be no lower than 0.1 per channel for a standard survival map.
Step 2: If the ambient is at 0.25 per channel and the map still appears dark, verify the sun's Pitch angle. A midday sun should have a Pitch of 50-70 degrees. A Pitch of 20 degrees produces a dawn/dusk appearance even at noon.
Step 3: If the ambient and sun Pitch are correct but the map remains dark, check the Sky_Sun_Color field in Level.dat. This field defines the sun's color and intensity. The default value should be a warm white: 1.0 0.95 0.85 or similar. A darker value reduces the sun's illumination output.
Failure mode: shadows flickering
Shadows that flicker, strobe, or rapidly appear and disappear as the camera moves are suffering from shadow map clipping artifacts.
What it looks like: As the camera moves, shadows on terrain and objects flash on and off. The shadow edges shimmer or strobe. The effect is most visible at the transition between shadowed and unshadowed areas.
Root cause: The shadow distance is too long for the scene's geometry complexity, or the shadow near-plane and far-plane clipping produce artifacts at certain camera distances.
Resolution steps:
Step 1: Reduce the shadow distance in the Lighting panel by 50-unit increments. Shorter shadow distances reduce the shadow frustum size, which reduces the likelihood of near-plane clipping artifacts.
Step 2: If reducing the shadow distance does not resolve the flickering, reduce the shadow resolution from High to Medium. Lower resolution shadow maps are less prone to aliasing artifacts at the shadow boundary.
Step 3: Verify that all terrain and objects that should cast shadows have shadow casting enabled in their asset configurations. Objects without shadow casting enabled can cause the shadow map to behave unpredictably.
Step 4: If the flickering only occurs at specific camera positions (typically near the edge of the map), the shadow cascade configuration may be mismatched with the map size. Reduce the cascade count from 4 to 2, or increase the cascade split distance in the Unity lighting settings.
Failure mode: fog washing out colors at all distances
Fog that desaturates or tints the scene even at close camera distances has intensity set too high or color that is too dominant.
What it looks like: The terrain, objects, and sky all have a gray or blue-gray tint that does not vary with lighting. The fog is visible at distances of 10-20 units, washing out near-field colors.
Root cause: The Fog_Intensity value in Level.dat is set too high, or the Fog_Density value in the lighting panel is too high.
Resolution steps:
Step 1: Locate the Fog_Intensity field in the map's Level.dat file. Reduce the value from its current setting to 0.02-0.03. Higher intensity values make the fog more opaque at all distances.
Step 2: If the fog still washes out colors at close distance, reduce the Fog_Density value in the Lighting panel. A density of 0.003-0.005 is appropriate for most maps. Higher densities produce visible fog at shorter distances.
Step 3: If the fog color cast persists (the fog has a blue or gray tint that dominates the scene), adjust the Fog_Color value toward a neutral gray (0.5 0.5 0.5) to reduce the color influence on the scene.
Failure mode: weather not occurring
Weather that is configured in the level asset but never occurs naturally in-game is failing to trigger due to scheduling or configuration issues.
What it looks like: The map loads and runs through multiple in-game days without any weather event. Rain, snow, and fog are all absent despite being configured.
Root cause: The Weather_Types array is empty or contains entries with invalid weather asset references. Alternatively, the frequency values are too large, making weather events extremely rare.
Resolution steps:
Step 1: Open the Level Settings panel and navigate to the Weather section. Confirm that at least one weather entry exists in the list and that the asset field points to a valid weather asset.
Step 2: Test the weather manually using the in-game /weather command with the weather asset's GUID. If the weather appears when manually triggered, the scheduling configuration is the issue.
Step 3: For testing purposes, set Min_Frequency to 0 and Max_Frequency to 1. This ensures the weather event is eligible to occur on the first in-game day. Weather the map for 1-2 in-game day cycles and confirm the weather occurs.
Step 4: After verifying the weather works with aggressive scheduling, restore the intended frequency values for the published map.
Failure mode: weather appearing at the wrong time of day
Weather that appears visually incorrect at certain times of day (rain that looks bright white at midnight, fog that is invisible at noon) has misconfigured time-of-day color properties.
What it looks like: Rain during midnight appears as bright white streaks against a dark sky, or fog at noon is invisible because the fog color matches the sky color exactly.
Root cause: The weather asset's time-of-day color blocks (Dawn, Midday, Dusk, Midnight) are not configured, using default lighting panel colors that do not match the weather theme.
Resolution: Configure the Fog_Color, Cloud_Color, and Cloud_Rim_Color fields for each time-of-day block in the weather asset's .dat file. Each time-of-day block should define colors that look natural for the weather type at that time of day. Rain at midnight should use dark fog colors; rain at midday should use gray fog colors.
Failure mode: overnight lighting producing zero visibility
Nighttime on the map that is completely black with no visible terrain is the result of ambient color being too low combined with an incorrect moon or skybox brightness.
What it looks like: At in-game midnight, the viewport is completely black. The player cannot see terrain, objects, or navigational features. Even with a flashlight, the scene is unplayably dark.
Root cause: The ambient color at midnight is set to 0.0 or near-zero values, and the skybox brightness at night is too low to provide any fill light.
Resolution steps:
Step 1: Open the Lighting panel and inspect the ambient color fields for the Midnight time-of-day color block. The ambient color at midnight should be at least 0.02-0.05 per channel to provide minimal visibility.
Step 2: If the midnight ambient is already above 0.02 and the scene is still completely black, verify that the skybox brightness at midnight is configured in the Level Settings panel. The skybox should have a dark blue or dark gray color with a brightness of at least 0.05-0.1.
Step 3: As a final step, configure the moon as a secondary light source. The moon position and intensity are configured through the lighting panel's time-of-day colors. A full moon can provide enough illumination to navigate without a flashlight.
FAQs
What is the correct shadow distance for a performance-oriented map?
The cohort recommendation for a map targeting 60 FPS on mid-range hardware is a shadow distance of 100-150 units on Medium maps and 80-120 units on Large maps. Shadow rendering is one of the most expensive post-processing effects. Reducing the shadow distance has the most significant positive impact on frame rate, especially in areas with dense object placement and complex terrain.
How do I make a map that is always foggy?
Set a dense fog weather as the perpetual weather asset in the Level Settings panel. Configure the fog weather asset with high fog density (0.3-0.6), a gray or appropriate fog color, and a Fade_In_Duration that matches the desired transition time. The perpetual weather is active from map load and never fades out.
Why does my rain weather have no rain particles?
The rain particles are defined in the weather asset's Effects array. If the Effects array is empty or references a particle prefab that is not bundled correctly, no particles appear. Verify that the weather asset has at least one Effects entry with a valid Prefab pointer to a particle system in a master bundle.
Can I have weather that only affects one region of the map?
Yes. Use the Volume_Mask field in the weather asset combined with ambience volumes on the map. The weather is only active when the player's camera is inside an ambience volume whose mask has a non-zero bitwise AND result with the weather's volume mask. This allows region-specific weather such as a foggy swamp zone or a rainy forest area.
How do I make the sun set at a specific real-time minute?
The day and night cycle timing is controlled by the Day_Length and Night_Length fields in Level.dat. The sun's position at any given time is interpolated from the skybox configuration. To make the sun set at a specific real-time minute, calculate the percentage through the day cycle at which the sunset should occur and adjust the lighting keyframes' time values accordingly.
Why does my map have no shadows on terrain?
Verify that shadows are enabled in the Lighting panel's Shadow Configuration section. The Shadow Distance must be set to a positive value (100-200 units). If shadows still do not appear, verify that the terrain and objects have lightmap UVs generated and that the terrain material supports shadow receiving.
How do I prevent fog from making the entire map look gray?
Reduce the Fog_Intensity value in Level.dat and the Fog_Density value in the Lighting panel. Set the fog color to a desaturated version of the dominant sky color rather than a neutral gray. The cohort recommendation for maintaining color saturation is to keep Fog_Intensity below 0.05 and Fog_Density below 0.01.
Can I use custom skybox textures?
The skybox in Unturned is configured through the level asset's skybox properties, not through the Lighting panel. Custom skybox textures must be authored as a master bundle asset and referenced in the level asset configuration. The Lighting panel's sun angle and ambient color interact with the skybox but do not control the skybox texture directly.
Why does my fog change color at different times of day?
The fog color interpolates between the configured time-of-day color blocks. If the fog color at dawn is pink and the fog color at midday is white, the fog transitions through a pink-to-white gradient between those times. Configure color blocks for all four times of day (Dawn, Midday, Dusk, Midnight) to control the fog color throughout the full day-night cycle.
How many weather types should I configure for a standard map?
The cohort recommendation is 2-4 weather types for a standard survival map. Rain and fog are the minimum set. Snow is appropriate for cold-climate maps. Thunderstorms or custom weather types are optional additions for atmospheric variety.
Best practices
- Configure the baseline lighting (sun, ambient, fog) before adding weather types. The baseline is the default state; weather modifies it temporarily.
- Set weather frequency values to 0-1 for testing, then increase the intervals for the published map.
- Test the map at all four times of day (Dawn, Midday, Dusk, Midnight) during lighting configuration. A map that looks correct at noon may be unplayably dark at midnight.
- Use the ambient color to provide minimum visibility at night. The cohort minimum is 0.02 per channel.
- Keep the shadow distance as short as the map's visual quality allows. Shorter shadow distances improve frame rate measurably.
- Match the fog color to the sky color at the dominant time of day. Fog that matches the sky looks natural; fog that contrasts with the sky looks artificial.
- Test every weather type manually with the
/weathercommand before relying on natural scheduling. - Save the lighting configuration after every adjustment. The Lighting panel does not auto-save changes.
Advanced considerations
Time-of-day color interpolation
The lighting system interpolates color values between the four configured time-of-day blocks (Dawn, Midday, Dusk, Midnight). The interpolation is linear between the nearest two blocks. If the Midnight block is set to dark blue and the Dawn block is set to warm orange, the predawn period transitions from blue to orange over the interpolation period. The interpolation can produce unexpected color combinations at the midpoint if the source and target colors are very different. The cohort recommendation is to define colors for all four blocks and to verify the interpolation by cycling through the full day-night cycle in the editor viewport.
Weather volume masking for region-specific effects
The Volume_Mask system allows weather to be restricted to specific regions defined by ambience volumes. Each ambience volume on the map can have a mask value (configured in the ambience volume's properties). A weather asset with a matching Volume_Mask value is only active while the player is inside an ambience volume whose mask has a non-zero bitwise AND with the weather's mask. This creates region-specific weather: a desert biome can have sandstorm weather that only activates in the desert ambience volume.
Weather and gameplay stat interaction
Weather assets can apply per-second buffs or debuffs to player stats through the Stamina_Per_Second, Health_Per_Second, Water_Per_Second, Food_Per_Second, and Virus_Per_Second fields. Rain weather can provide water to players (positive Water_Per_Second) but drain stamina (negative Stamina_Per_Second). Acid rain weather can damage player health (negative Health_Per_Second). These gameplay effects are independent of the visual lighting and weather rendering.
Appendix A: Lighting panel field reference
| Field | Section | Type | Range | Default | Purpose |
|---|---|---|---|---|---|
| Sun Pitch | Sun Direction | float | -90 to 90 | 45 | Elevation angle of the directional light |
| Sun Yaw | Sun Direction | float | 0 to 360 | 180 | Compass direction of the directional light |
| Ambient R | Ambient Color | float | 0.0 to 1.0 | 0.15 | Red channel of ambient illumination |
| Ambient G | Ambient Color | float | 0.0 to 1.0 | 0.15 | Green channel of ambient illumination |
| Ambient B | Ambient Color | float | 0.0 to 1.0 | 0.18 | Blue channel of ambient illumination |
| Shadow Distance | Shadow Configuration | float | 0 to 1000 | 200 | Maximum shadow rendering distance |
| Shadow Resolution | Shadow Configuration | enum | Low/Med/High/Very High | High | Shadow map resolution |
| Shadow Cascades | Shadow Configuration | enum | 1/2/4 | 2 | Number of shadow frustum splits |
| Fog Color | Fog Configuration | color | RGB | 0.6 0.7 0.8 | Fog overlay color |
| Fog Density | Fog Configuration | float | 0 to 1 | 0.005 | Fog opacity ramp rate |
| Fog Intensity | Fog Configuration | float | 0 to 1 | 0.03 | Maximum fog opacity |
Appendix B: Lighting and weather failure mode diagnostic table
| Symptom | Most likely cause | Resolution |
|---|---|---|
| Map too dark at noon | Ambient color too low or sun Pitch too shallow | Increase ambient to 0.15-0.25 per channel; set sun Pitch to 50-70 degrees |
| Shadows flickering at camera moves | Shadow distance too long for scene complexity | Reduce shadow distance by 50-unit increments |
| Fog washes out colors at all distances | Fog_Intensity too high or Fog_Density too high | Reduce Fog_Intensity to 0.02-0.03; reduce Fog_Density to 0.003-0.005 |
| Weather never occurs naturally | Weather_Types array empty or frequency values too large | Verify array has valid entries; set Min_Frequency to 0 for testing |
| Weather particles not visible | Effects array empty or prefab missing from bundle | Verify weather asset has valid Effects entries |
| Night is completely black | Ambient color at midnight is 0.0 or skybox brightness too low | Set midnight ambient to at least 0.02 per channel |
| Fog color changes unexpectedly across day | Time-of-day color blocks not fully configured | Configure fog colors for all four time-of-day blocks |
| Shadow quality is poor with 2 cascades | Terrain elevation variation exceeds cascade coverage | Increase to 4 cascades or reduce shadow distance |
| Weather transitions are instant | Fade_In_Duration or Fade_Out_Duration is 0 | Set positive fade durations in weather asset |
| Weather asset not found in browser | Asset not loaded in map's master bundles | Verify weather asset bundle is included in map export |
Appendix C: Weather type configuration reference table
| Weather type | Fade_In (sec) | Fade_Out (sec) | Fog_Color (R G B) | Fog_Density | Wind_Main | Min_Freq | Max_Freq | Min_Dur | Max_Dur |
|---|---|---|---|---|---|---|---|---|---|
| Light rain | 10 | 15 | 0.5 0.55 0.6 | 0.2 | 0.2 | 1 | 3 | 1 | 2 |
| Heavy rain | 8 | 12 | 0.4 0.45 0.5 | 0.4 | 0.5 | 2 | 5 | 1 | 2 |
| Fog | 30 | 30 | 0.7 0.7 0.75 | 0.8 | 0.0 | 2 | 5 | 1 | 1 |
| Light snow | 15 | 20 | 0.75 0.78 0.8 | 0.3 | 0.2 | 2 | 4 | 1 | 3 |
| Heavy snow | 10 | 15 | 0.6 0.65 0.7 | 0.6 | 0.4 | 3 | 6 | 1 | 2 |
The frequency and duration values above are in in-game days. An in-game day at default settings is approximately 30-60 minutes of real time depending on the Day_Length and Night_Length configuration in Level.dat.
Authoring checklist
Before publishing a map with configured lighting and weather, confirm the following:
- [ ] Sun angle produces correct lighting at all four times of day (Dawn, Midday, Dusk, Midnight)
- [ ] Ambient color provides minimum 0.02 per channel at midnight for nighttime visibility
- [ ] Shadow distance is appropriate for the map size and target hardware
- [ ] Shadow resolution and cascade count balance quality with performance
- [ ] Fog color and density produce natural distance fade without color washout
- [ ] At least one weather type is configured with valid scheduling parameters
- [ ] Each weather type has been tested manually with the
/weathercommand - [ ] Weather fade transitions are smooth (not instant)
- [ ] Weather particles are visible and correctly positioned
- [ ] Weather effects do not wash out map colors at close distances
- [ ] Perpetual weather (if used) produces the intended permanent atmosphere
Cross-references
- Road and Path Tool -- the previous article; covers road spline placement that precedes lighting configuration.
- Object Placement and Manipulation -- the next article; covers object placement that follows lighting configuration.
- Weather Asset Reference -- the complete field reference for custom weather asset .dat configuration.
- Terrain Material Painting -- the terrain editing workflow that precedes lighting and weather.
- Level Asset Reference -- the level asset configuration including weather scheduling.
- Level Config Reference -- the Config.json fields including lighting and fog parameters.
- Smartly Dressed Games modding documentation -- official field reference.
- Unturned on Steam -- game page and community.
Document history
| Version | Date | Author | Notes |
|---|---|---|---|
| 1.0 | 2026-07-26 | 57 Studios | Initial publication. Lighting panel, sun angle, ambient color, shadow configuration, fog, weather scheduling, weather asset configuration, failure mode documentation. |
