Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Atmosphere

The Atmosphere object pushes Roblox closer toward realistic environments where sunlight scatters in different ways depending on density and other air particle properties.

Member index 6

HistoryMember
731Color: Color3
731Decay: Color3
731Density: float
731Glare: float
731Haze: float
731Offset: float
inherited from Instance
731Archivable: bool
731Capabilities: SecurityCapabilities
731IsInSandbox: bool
731Name: string
731Parent: Instance
731PredictionMode: PredictionMode
731Sandboxed: bool
731UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
731children(): Instances
731clone(): Instance
731destroy(): null
731findFirstChild(name: string, recursive: bool = false): Instance
731getChildren(): Instances
731isDescendantOf(ancestor: Instance): bool
731remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
731childAdded(child: Instance)
inherited from Object
731ClassName: string
731className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
731isA(className: string): bool
647Changed(property: string)

Description

Fog properties are hidden when Lighting contains an Atmosphere object.

The Atmosphere object pushes Roblox closer toward realistic environments where sunlight scatters in different ways depending on density and other air particle properties. It simulates real-world "aerial perspective" and lets you control light transmission from the background sky through distant objects. Furthermore, it controls haze and glare conditions, letting you tune a perfect sunset, foggy afternoon, and more.

See also:

  • Atmospheric Effects for property comparisons and example environments.
  • Skybox for how to change the default skybox for games and customize the lighting.
  • Post-Processing Effects for how post-processing effects can quickly improve a game's visuals with a variety of customizable filters.

History 45

Members 6

Color

TypeDefault
Color30.7843, 0.6667, 0.4235

A Color3 value which changes the Atmosphere hue for subtle environmental moods. This is best combined with increased Atmosphere.Haze to expand the visible effect.

History 8

Decay

TypeDefault
Color30.3608, 0.2353, 0.0549

Defines the hue of the Atmosphere away from the sun, gradually falling off from Atmosphere.Color towards this value. Must be used with Atmosphere.Haze and Atmosphere.Glare levels higher than 0 to see any effect.

History 8

Density

TypeDefault
float0.395000011

Defines the amount of particles in the air. The higher the density, the more particles and the more in-game objects/terrain will be obscured by them. Note that density does not directly affect the skybox — it merely affects in-game objects/terrain and visibility of the skybox through them.

History 8

Glare

TypeDefault
float0

Specifies the glow/glare of the Atmosphere around the sun. More glare results in an increased effect of sunlight cast onto the sky and world. Must be used with a Atmosphere.Haze level higher than 0 to see any effect.

History 8

Haze

TypeDefault
float0

Defines the haziness of the Atmosphere with a visible effect both above the horizon and into the distance. This can be combined with Atmosphere.Color to create environmental moods, like a grey tint for a polluted alien planet.

History 8

Offset

TypeDefault
float0

Controls how light transmits between the camera and the sky background. Increase this value to create a horizon silhouette against the sky or reduce it to blend distant objects into the sky for an endless and seamless open world.

Offset should be balanced against Atmosphere.Density and carefully tested in your place. A low offset may cause "ghosting" where the skybox can be seen through objects/terrain. This can be corrected by increasing the offset, which more clearly silhouettes distant objects/terrain against the sky, but too much offset may reveal level-of-detail "popping" for far distant terrain and meshes.

History 8

Settings