Atmosphere with Density>0 has incorrect colour for a split second when inserted into Lighting

Issue Type: Display
Impact: High
Frequency: Constantly
Date First Experienced: 2020-01-09 00:01:00 (+00:00)
Date Last Experienced:

Reproduction Steps:
This issue is only visible at dark, night-like environments. In other words, you have to set all properties of the Lighting service to some “dark” values. Set Ambient and OutdoorAmbient to (0,0,0), and insert an Atmosphere into Lighing. Set all properties of the Atmosphere (Color, Decay) to dark values as well. Set the Density of the Atmosphere to some high value (say 0.5). Now, reinsert the Atmosphere into Lighting (it happens both in-game and edit mode when you cut and paste). A bright blue fog will appear for about half a second, creating an unintended, ugly visual effect, which shows the outlines of all distant objects that shouldn’t be seen with these settings.
Here’s an empty place that reproduces this issue:
atmosphereBug.rbxl (28.9 KB)
As far as I know, this issue happens on all machines.

Expected Behavior:
The bright fog should never be seen in this situation. Setting all Lighting and Atmosphere settings to dark values shouldn’t allow this to happen. The Atmosphere should be dark as soon as it’s inserted, like in this screenshot:

Actual Behavior:
Below is the ugly fog effect I’m talking about. In my game, it gives players an ability to see distant objects when they should be obscured by the Atmosphere, and ruins the visuals.

Video that shows how it affects my game. When the camera moves underwater, a local script hides Atmosphere by removing it temporarily from Lighting and adds it back when the camera moves above water’s surface:
robloxapp-20210129-0058328.wmv (1021.1 KB)

One partial workaround I found is to set the Density of the Atmosphere to 0 before it’s inserted to Lighting, and set it back to the value we want after like 1 second. This workaround doesn’t satisfy me of course, because it still shows all distant parts of the game that shouldn’t be seen. It only removes the bright fog effect.


A better workaround, and the intended usage, is to keep the Atmosphere object in Lighting.

Simply change its Density property. Set it to 0 when you want it off instead of removing it.


I don’t want to set its density to 0, in the previous workaround I removed it so I could replace it with the old fog effect (FogEnd, I probably should have mentioned that earlier). If I am to keep it in Lighting even for the underwater camera, I actually have to increase its density while in water. And it’s not a good solution either. Even though I updated the Colour and other properties of the Atmosphere using RenderStepped as soon as the camera went underwater, the colour changes were delayed by around 1 second, causing another unacceptable visual issue.
Here’s the video: robloxapp-20210129-1519277.wmv (716.4 KB)


That’s fair enough. If you want to be able to use fog when it’s disabled then I agree that workaround would be worse than your current one. Hopefully the engineers can do some changes to the way it renders


Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.