Setting Lighting.TimeOfDay to 19:13:40 Causes Sudden Brightness Difference

Reproduction Steps

  • Reference image:

  • Make sure Lighting.GeographicLatitude is set to 41.733, which is the default. Changing this will also change the TimeOfDay this error occurs.

  1. Set Lighting.TimeOfDay to 19:13:39 with Lighting.Brightness greater than 0.
  2. Notice how the place is very dark and that brightness changes do not have an effect. You can set the brightness to a very large value like 1000. Only the sides of the baseplate will be lit up, but not the top.
  3. Set Lighting.TimeOfDay to 19:13:40. The Lighting.Brightness was applied to the top of the baseplate, which is not intended. This also causes noticeable differences at lower brightness levels.

This issue lasts until the TimeOfDay is back to 19:13:40 at the next cycle.

Expected Behavior
I expect the brightness to gradually increase, and decrease based on TimeOfDay, and at a reasonable time. For a GeographicLatitude of 41.733, this time would be around 6:07. Alternatively, I would also accept the light to be consistent, or for the brightness to go back up when the moon is out.

Actual Behavior
The brightness jumps from a very low value set by TimeOfDay to the original value set in Lighting.Brightness.
Before:

After:

This is very noticeable in time-of-day scripts.

Workaround:
You can make the effect less noticeable by turning EnvironmentDiffuseScale and EnvironmentSpecularScale to 0. This is not suitable in many lighting environments. Alternatively, you can set Brightness to 0 and rely on EnvironmentDiffuseScale to provide light from the skybox textures, but again, this might mess up the lighting.

6 Likes

I think this bug is caused by how there can only be one directional light source active at a time. Changing the TimeOfDay to this specific value just happens to be the transition for when the sun stops emitting light and the moon starts.

3 Likes

I definitely think that is the case, but I do not see a reason why the transition period has to be so sudden.

I think exposing a property or at least addressing this behavior in the docs would make this issue more mitigatable, or by having multiple active global light sources.

Edit: you can see the proper behavior by changing the time gradually through the sunrise.

2 Likes

This has not been addressed yet as of 9/1/2023.

2 Likes

Noticed this a while back and would love to see it fixed. It makes everything unnecessarily dark as the moon is rising and feels jarring during day/night cycles.

In my opinion, if the snap is unavoidable due to technical limitations, it’d at least be nice if it occured at 18 when the sun & moon are level instead of more than an hour after the moon rises.

3 Likes

its incredibly irritating that Roblox does not grant us the ability to alter the transition period, and that we have no ability to disable or control the brightness of the moonlight. It ruins the challenge of the night being dark.

1 Like

Thanks for the report! We’ll follow up when we have an update for you.

4 Likes

I did further tests and found that it has an internal roll-off somewhere at 4-5 AM where the snap was clearly avoidable because the light of the moon went darker before the sun light came up. Seems very fixable to me.

2 Likes