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 Light in 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.fog state.
  • Controls RenderSettings.fogColor.
  • Adjusts RenderSettings.fogDensity and RenderSettings.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, and RenderSettings.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

  1. Navigate to the Atmospheric Controller tab on the Dashboard.
  2. 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."
  3. Click Generate Atmosphere.
  4. The Unity editor will instantly transition your lighting and environment settings.

[!TIP] Lighting Undo Support: Unlike raw editor commands, changes to RenderSettings and lighting parameters are recorded in the Unity Undo stack using Undo.RecordObject(RenderSettings.GetSerializedObject()) and Undo.RecordObject(directionalLight). Press Ctrl+Z to revert a generated mood instantly.


This site uses Just the Docs, a documentation theme for Jekyll.