Atmospheric Control & Moods
The Atmospheric Controller leverages the AI engine to configure lighting, ambient colors, fog, and skyboxes to match a target environmental mood (e.g. “Spooky Neon Cyberpunk” or “Sunny Autumn Afternoon”) with a single command.
Technical Features Modifiable by AI
The AI engine translates environmental descriptions into concrete Unity scene changes using the following properties:
1. Directional Light Calibration
- Locates the active
Directional Lightin the scene (or creates one if missing). - Modifies
Light.color,Light.intensity, and rotation angles (simulating time of day). - Sets shadow properties (e.g., enabling soft shadows for realistic moods).
2. Global RenderSettings Fog
- Toggles
RenderSettings.fogstate. - Controls
RenderSettings.fogColor. - Adjusts
RenderSettings.fogDensityandRenderSettings.fogMode(Linear, Exponential, or ExponentialSquared). - Configures start and end clip distances for linear fog.
3. Ambient Lighting
- Sets the skybox source mode (
RenderSettings.ambientMode). - Calibrates ambient colors (
RenderSettings.ambientLight,RenderSettings.ambientSkyColor,RenderSettings.ambientEquatorColor, andRenderSettings.ambientGroundColor).
graph TD
A[Mood Prompt Input] --> B[AI Atmospheric Service]
B --> C[Analyze Scene Lighting]
C --> D[Calibrate Directional Light Angle & Intensity]
C --> E[Configure RenderSettings Ambient Colors]
C --> F[Setup RenderSettings Fog Properties]
D & E & F --> G[Apply via Undo.RecordObject]
How to Set Atmospheric Moods
- Navigate to the Atmospheric Controller tab on the Dashboard.
- In the Mood Description box, enter your design intent:
- Example 1:
"Spooky, damp forest. Deep green fog, cold blue moonlight filtering down, directional light set low." - Example 2:
"Sunset desert storm. Intense golden-orange directional light casting long shadows, warm hazy fog, dim ambient light."
- Example 1:
- Click Generate Atmosphere.
- The Unity editor will instantly transition your lighting and environment settings.
[!TIP] Lighting Undo Support: Unlike raw editor commands, changes to
RenderSettingsand lighting parameters are recorded in the Unity Undo stack usingUndo.RecordObject(RenderSettings.GetSerializedObject())andUndo.RecordObject(directionalLight). PressCtrl+Zto revert a generated mood instantly.