rojo/.cursor/rules/roblox/en-us/environment/index.md
2026-02-02 14:05:11 -06:00

3.9 KiB

title description
Lighting and effects Create more immersive environments through lighting, atmospheres, and special effects.

The Class.Lighting container services let you control and customize an experience's environment such as lighting, atmosphere, and clouds. You can also apply post-processing effects to adjust how the experience appears on the screen.

Global lighting

The Class.Lighting service contains properties that you can adjust to update the global lighting in an experience, such as the Class.Lighting.ClockTime|ClockTime and Class.Lighting.Brightness|Brightness.

Lighting with ClockTime of 0 (TimeOfDay of 00:00:00) Lighting with ClockTime of 6.3 (TimeOfDay of 06:18:00) Lighting with Brightness property of 0.5 Lighting with Brightness property of 3.75 In addition to global lighting, you can create and attach [light sources](../effects/light-sources.md) to parts or attachments to simulate objects like lamps, torches, spotlights, or TV screens.

Atmospheric effects

Atmospheric effects simulate realistic environments by scattering sunlight in unique ways. Using the Class.Atmosphere object in the Class.Lighting service, you can control air particle density, simulate haze or glare, set an atmosphere's color, and more.

Atmospheric effects used to render a brilliant sunset scene
Atmospheric effects used to render a brilliant sunset scene

Clouds and skies

By default, the Class.Sky object forms a skybox with celestial bodies such as a sun, moon, and stars. In addition, you can adjust the cloud cover, density, and color properties of the Class.Clouds object to render realistic, dynamic clouds that drift slowly across the sky through global wind.

Wind blowing dynamic clouds across the sky

Post-processing effects

Post-processing effects are customizable filters that allow you to quickly enrich the visuals of your experience. Using the post-processing effect objects in the Class.Lighting service or Class.Camera, you can:

  • Simulate a camera viewing a bright light and exaggerate its glow.
  • Apply a Gaussian blur to the entirety of your experience or add a blur to parts of your experience that aren't in focus.
  • Enhance an environment's appearance to create a specific mood through hue.
  • Render a halo of light that moves with the sun.
Landscape with depth-of-field effect applied, simulating distance blur
Landscape with depth-of-field effect applied, simulating distance blur