Sayfalar (23)Celestial Module
- Overview
- Installation
- Getting started
- Quick Start window
- System overview
- Easy Weather Manager
- Time Module
- Celestial Module
- Cloud Module
- Volumetric clouds
- Cloud shadows
- Fog
- Detail Module
- Weather Effects Module
- Weather presets
- Events Module
- Lens flare occlusion
- Helper components
- Demo scene
- Scripting guide
- Troubleshooting
- FAQ
- Changelog
Celestial Module
Son güncelleme: 6 Ekim 2026
Bu sayfa henüz Türkçeye çevrilmedi, İngilizcesi gösteriliyor.
Lighting and the look of the sky. It drives the sun light's color, intensity and shadows, writes Unity's ambient (Trilight) colors, sets the sky's zenith and horizon colors, and controls how the sun and moon look.
The inspector has the sections General References, Lighting Settings, Sun Settings, Moon Settings and Sky Colors. Most values can be switched between a fixed value and a 24 hour curve or gradient.
References
| Setting | Description |
|---|---|
directionalLight | The sun light this module colors. The Time Module rotates it |
skyboxMaterial | The sky material. Falls back to the scene's skybox when empty |
cloudMaterial | The sky dome material |
setAsEnvironmentLight | Sets the light as the scene's sun (RenderSettings.sun) |
reflectionMode | Environment reflection source |
Auto-Find References fills these in. It prefers the system's own sun and ignores lights named like a moon.
Light and shadows
| Setting | Description |
|---|---|
lightIntensity, lightColor | Intensity and color of the sun light, fixed or over the day |
shadowType, shadowResolution | Light shadow type and resolution |
shadowStrength, shadowSoftness, shadowDistance | Shadow response, fixed or over the day |
overridePipelineShadowSettings | Lets the module write the shadow distance into the URP asset |
Ambient light
| Setting | Description |
|---|---|
ambientSkyColor, ambientEquatorColor, ambientGroundColor | The three Trilight ambient colors, fixed or over the day |
ambientIntensity | Ambient strength, fixed or over the day |
groundColorMultiplier | Brightness multiplier for the ground color |
useCloudCoverageOnAmbient, cloudCoverageInfluence | Darkens the ambient light as the clouds thicken |
Sun and moon
| Setting | Description |
|---|---|
sunColor, sunSize, sunGlow, sunsetIntensity | The sun disc, its glow and the strength of the sunset coloring |
moonColor, moonSize, moonGlow, moonTexture | The moon |
Sun visibility
How much of the sun gets through. These settings sit under Sun Settings and let a storm dim the sun while a low sun can still be seen through the horizon fog.
| Setting | Default | Description |
|---|---|---|
sunDiscIntensity, sunGlowIntensity | 5, 2 | Brightness of the sun disc and of the halo around it (HDR) |
dimSunByClouds (Dimmed By Clouds) | on | Dims the disc, the halo and the lens flare with cloud cover. Skipped while the 2D cloud layer is off, since nothing is drawn in front of the sun |
cloudSunDimming | 0.85 | How much the clouds take away at full cover |
cloudSunDimmingStart (Starts At Coverage) | 0.55 | Coverage where the dimming starts, so a partly cloudy sky keeps a bright sun |
sunHorizonBoost (Horizon Boost) | 1.8 | Extra disc brightness while the sun is low, where the fog is thickest. 1 means no boost |
sunHorizonBoostHeight | 0.25 | Sun height where the boost has faded out |
autoLensFlare, lensFlare | on | Fades a LensFlareSmoothOcclusion on the sun with the sun height and dims it with cloud cover. Found automatically |
lensFlareOutHeight, lensFlareInHeight | -0.02, 0.12 | Sun heights where the flare is fully out and fully in. It is gone before the sun light switches off, so it never pops |
Sky colors
skyZenithColor and skyHorizonColor color the sky overhead and at the horizon. Each has a gradient (on by default) that covers the whole day, night included, so one gradient per row is all you edit.
For shader authors
The module publishes shader globals every frame, for materials outside the sky:
| Global | Content |
|---|---|
_KDASkyZenithWS, _KDASkyHorizonWS | Current sky colors |
_KDASunDirWS, _KDASunColorWS | Sun direction and color |
_KDASunVisibility | x = cloud cover factor, y = daylight, w = 1 while valid |
The demo water builds its reflection and sun glitter from these, so it follows the time of day and the weather. Your own shaders can read them the same way.
Public API
| Member | Description |
|---|---|
void SetLightIntensity(float intensity) | Set the light intensity |
void SetLightColor(Color color) | Set the light color |
void SetShadowSettings(float strength, float softness, float distance) | Set the three shadow values |
void SetAmbientColors(Color sky, Color equator, Color ground, float intensity) | Set the ambient light |
void SetCloudCoverage(float coverage) | Feed a coverage value into the ambient darkening |
float GetSunHeight() | Sine of the sun's elevation, read from the clock so it never jumps when the light switches |
float SunVisibility | Cloud cover factor last applied to the sun: 1 for a clear sky |
void UpdateDirectionalLight(), void UpdateAmbientLight(), void UpdateShaders() | Push values after changing fields from code |
void SetWeatherOverrideFields(WeatherOverrideFields fields, bool active) | Hands values to a weather preset, or takes them back. A held value skips its gradient or curve |
WeatherOverrideFields WeatherOverrideMask, bool IsWeatherOverriding(WeatherOverrideFields fields) | Which values a preset currently holds |
SetWeatherOverrideActive(bool), SetWeatherLightOverrideActive(bool), SetWeatherAmbientOverrideActive(bool) | Shortcuts for the Sky, Light and Ambient groups |
void SetWeatherAmbientBlend(float blend), float WeatherAmbientBlend | How far the cloud darkening of the equator color is handed to the preset, 0 to 1 |
WeatherOverrideFields is a flags enum: SunColor, MoonColor, SunsetIntensity, SkyZenith, SkyHorizon, LightIntensity, LightColor, ShadowStrength, AmbientSky, AmbientEquator, AmbientGround, AmbientIntensity, and the groups Sky, Light, Ambient and All. The Weather Effects Module uses these; you need them only when you drive these values from your own code while a gradient is on.
Bu sayfaya bağlantı veren sayfalar
Hâlâ takıldınız mı?
Unity sürümünüzü, render pipeline bilginizi ve sorunun ekran görüntüsünü gönderin.

