EDIT: This isn’t going to happen, PLEASE stop bumping this thread.
Throughout a Roblox day, the sky’s hue changes based on the time of day using two internal color sequences.
One sequence controls the hue of the sky’s top side, while the other sequence controls the tint of the sky’s bottom side. The rest of the sides are cross-blended between these two sequences from top to bottom to control the overall look of Roblox’s skybox.
After careful observation with a white skybox, I was able to pin down the ColorSequences that control this behavior.
local day = 86400
local hour = day/24
local riseAndSetTime = hour/2
local sunRise = day*0.25
local sunSet = day*0.75
local upperSkyAmbient = ColorSequence.new
{
ColorSequenceKeypoint.new(0, Color3.new());
ColorSequenceKeypoint.new((sunRise-(hour*2))/day, Color3.new());
ColorSequenceKeypoint.new((sunRise-hour)/day, Color3.new(0.07,0.07,0.1));
ColorSequenceKeypoint.new((sunRise-(hour/2))/day, Color3.new(0.2,0.15,0.01));
ColorSequenceKeypoint.new(sunRise/day, Color3.new(0.2,0.15,0.01));
ColorSequenceKeypoint.new((sunRise+riseAndSetTime)/day, Color3.new(1,1,1));
ColorSequenceKeypoint.new((sunSet-riseAndSetTime)/day, Color3.new(1,1,1));
ColorSequenceKeypoint.new(sunSet/day, Color3.new(0.4,0.3,0.05));
ColorSequenceKeypoint.new((sunSet+(hour/3))/day, Color3.new());
ColorSequenceKeypoint.new(1, Color3.new());
}
local lowerSkyAmbient = ColorSequence.new
{
ColorSequenceKeypoint.new(0, Color3.new());
ColorSequenceKeypoint.new((sunRise-(hour*3))/day, Color3.new());
ColorSequenceKeypoint.new((sunRise-(hour*2))/day, Color3.new(0.21,0.21,0.28));
ColorSequenceKeypoint.new((sunRise-(hour/2))/day, Color3.new(0.4,0.3,0.3));
ColorSequenceKeypoint.new(sunRise/day, Color3.new(0.3,0.2,0.3));
ColorSequenceKeypoint.new((sunRise+riseAndSetTime)/day, Color3.new(1,1,1));
ColorSequenceKeypoint.new((sunSet-riseAndSetTime)/day, Color3.new(1,1,1));
ColorSequenceKeypoint.new(sunSet/day, Color3.new(0.4,0.3,0.2));
ColorSequenceKeypoint.new((sunSet+(hour/3))/day, Color3.new(0.3,0.2,0.3));
ColorSequenceKeypoint.new((sunSet+(hour*2))/day, Color3.new(0.3,0.2,0.3));
ColorSequenceKeypoint.new((sunSet+(hour*3))/day, Color3.new());
ColorSequenceKeypoint.new(1, Color3.new());
}
This got me thinking though. Wouldn’t it be neat if we could actually tune these sequences ourselves, using properties under a skybox?
Developers could utilize this to have more control over when the sun rises and sets, and how the sky is tinted throughout the day.
We could create our own aesthetics that pertain to the worlds we create.
- Perhaps it’s a polluted world and the sunrise has a greener tint.
- Maybe we’re on mars and the sky doesn’t get as much sunlight.
The sky is the limit really! (pun absolutely intended)