Loading...
Loading...
Lighting, atmosphere, post-processing, and visual mood for Roblox. Time of day, Lighting properties, Atmosphere, ColorCorrection, Bloom, DepthOfField, SunRays. Use when setting up environment visuals or creating mood/atmosphere.
npx skill4agent add tabooharmony/roblox-brain roblox-lightinglocal Lighting = game:GetService("Lighting")
-- Time of day (24-hour format as string)
Lighting.ClockTime = 14 -- 2 PM (numeric, 0-24)
Lighting.TimeOfDay = "14:00:00" -- same thing as string
-- Core lighting
Lighting.Brightness = 2 -- sun intensity (0-10, default 2)
Lighting.Ambient = Color3.fromRGB(70, 70, 70) -- shadow color
Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128) -- outdoor shadow fill
Lighting.ColorShift_Top = Color3.fromRGB(0, 0, 0) -- sky color tint
Lighting.ColorShift_Bottom = Color3.fromRGB(0, 0, 0) -- ground bounce tint
-- Shadows
Lighting.GlobalShadows = true
Lighting.ShadowSoftness = 0.2 -- 0 = sharp, 1 = very soft
-- Environment
Lighting.EnvironmentDiffuseScale = 1 -- how much skybox colors affect surfaces
Lighting.EnvironmentSpecularScale = 1 -- skybox reflections on shiny surfaces
Lighting.Technology = Enum.Technology.Future -- or ShadowMap, VoxelAtmospherelocal atmo = Instance.new("Atmosphere")
atmo.Density = 0.3 -- fog thickness (0 = clear, 1 = opaque)
atmo.Offset = 0.25 -- how high fog starts (0 = ground, 1 = sky)
atmo.Color = Color3.fromRGB(199, 199, 199) -- fog color (near)
atmo.Decay = Color3.fromRGB(92, 92, 92) -- fog color (far/horizon)
atmo.Glare = 0 -- sun glare intensity (0-10)
atmo.Haze = 0 -- atmospheric haze (0-10)
atmo.Parent = Lightinglocal bloom = Instance.new("BloomEffect")
bloom.Intensity = 0.5 -- glow strength (0-1)
bloom.Size = 24 -- glow spread (pixels)
bloom.Threshold = 0.8 -- brightness threshold to bloom (0-1)
bloom.Parent = Lightinglocal cc = Instance.new("ColorCorrectionEffect")
cc.Brightness = 0 -- -1 to 1
cc.Contrast = 0.1 -- -1 to 1
cc.Saturation = 0.1 -- -1 to 1 (negative = desaturated)
cc.TintColor = Color3.fromRGB(255, 255, 255) -- color overlay
cc.Parent = Lightinglocal dof = Instance.new("DepthOfFieldEffect")
dof.FarIntensity = 0.3 -- blur at far distance
dof.FocusDistance = 50 -- studs where focus is sharpest
dof.InFocusRadius = 30 -- studs of sharp focus range
dof.NearIntensity = 0 -- blur at near distance
dof.Parent = Lightinglocal rays = Instance.new("SunRaysEffect")
rays.Intensity = 0.1 -- ray visibility (0-1)
rays.Spread = 0.5 -- ray spread angle (0-1)
rays.Parent = LightingLighting.ClockTime = 14
Lighting.Brightness = 2
Lighting.Ambient = Color3.fromRGB(128, 128, 128)
Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
-- Atmosphere: light haze
atmo.Density = 0.2
atmo.Offset = 0.5
atmo.Color = Color3.fromRGB(200, 220, 255)Lighting.ClockTime = 17.5
Lighting.Brightness = 2
Lighting.Ambient = Color3.fromRGB(80, 60, 40)
Lighting.OutdoorAmbient = Color3.fromRGB(150, 120, 80)
Lighting.ColorShift_Top = Color3.fromRGB(255, 200, 100)
-- Atmosphere: warm fog
atmo.Density = 0.3
atmo.Offset = 0.3
atmo.Color = Color3.fromRGB(255, 200, 150)
atmo.Decay = Color3.fromRGB(200, 100, 50)
-- Post: warm tint
cc.TintColor = Color3.fromRGB(255, 240, 220)
cc.Contrast = 0.1
bloom.Intensity = 0.4
bloom.Threshold = 0.7Lighting.ClockTime = 0
Lighting.Brightness = 0.5
Lighting.Ambient = Color3.fromRGB(30, 30, 50)
Lighting.OutdoorAmbient = Color3.fromRGB(20, 20, 40)
-- Atmosphere: dark blue fog
atmo.Density = 0.4
atmo.Offset = 0.1
atmo.Color = Color3.fromRGB(20, 20, 50)
-- Post: blue tint, low saturation
cc.TintColor = Color3.fromRGB(180, 190, 255)
cc.Saturation = -0.2
cc.Brightness = -0.05Lighting.ClockTime = 22
Lighting.Brightness = 0.3
Lighting.Ambient = Color3.fromRGB(10, 10, 15)
Lighting.OutdoorAmbient = Color3.fromRGB(5, 5, 10)
Lighting.GlobalShadows = true
Lighting.ShadowSoftness = 0.1 -- sharp shadows = scarier
-- Atmosphere: thick dark fog
atmo.Density = 0.5
atmo.Offset = 0
atmo.Color = Color3.fromRGB(10, 10, 10)
-- Post: desaturated, dark
cc.Saturation = -0.4
cc.Contrast = 0.2
cc.Brightness = -0.1
-- No bloom (bloom = cheerful)Lighting.ClockTime = 12
Lighting.Brightness = 1
Lighting.Ambient = Color3.fromRGB(20, 60, 80)
-- Atmosphere: heavy blue-green
atmo.Density = 0.7
atmo.Offset = 0
atmo.Color = Color3.fromRGB(30, 100, 120)
atmo.Decay = Color3.fromRGB(10, 40, 60)
-- Post: blue tint, blur
cc.TintColor = Color3.fromRGB(150, 200, 255)
cc.Saturation = -0.3
-- DepthOfField for murky distance
dof.FarIntensity = 0.5
dof.FocusDistance = 30
dof.InFocusRadius = 20Lighting.ClockTime = 12
Lighting.Brightness = 3
Lighting.Ambient = Color3.fromRGB(100, 100, 120)
-- Atmosphere: minimal, clean
atmo.Density = 0.1
atmo.Color = Color3.fromRGB(200, 210, 255)
-- Post: slight blue, high contrast
cc.TintColor = Color3.fromRGB(230, 240, 255)
cc.Contrast = 0.15
bloom.Intensity = 0.6
bloom.Threshold = 0.6
bloom.Size = 30local CYCLE_SPEED = 1 -- minutes per full day (1 = fast, 24 = real-time)
task.spawn(function()
while true do
Lighting.ClockTime += (task.wait() / 60) * (24 / CYCLE_SPEED)
if Lighting.ClockTime >= 24 then
Lighting.ClockTime -= 24
end
end
end)-- Client: tween lighting when entering zones
local function transitionToIndoor()
TweenService:Create(Lighting, TweenInfo.new(1), {
Brightness = 1,
Ambient = Color3.fromRGB(100, 90, 70),
}):Play()
TweenService:Create(atmo, TweenInfo.new(1), {
Density = 0,
}):Play()
end
local function transitionToOutdoor()
TweenService:Create(Lighting, TweenInfo.new(1), {
Brightness = 2,
Ambient = Color3.fromRGB(128, 128, 128),
}):Play()
TweenService:Create(atmo, TweenInfo.new(1), {
Density = 0.3,
}):Play()
end| Light | Use for | Key properties |
|---|---|---|
| Lamps, torches, orbs | Range, Brightness, Color |
| Flashlights, stage lights | Range, Angle, Face |
| Screens, panels, signs | Range, Angle, Face |
local function createTorch(part: BasePart)
-- Neon glow (visual only, no actual light)
part.Material = Enum.Material.Neon
part.Color = Color3.fromRGB(255, 150, 50)
-- Actual light emission
local light = Instance.new("PointLight")
light.Color = Color3.fromRGB(255, 170, 80)
light.Brightness = 2
light.Range = 20
light.Shadows = true -- expensive, use sparingly
light.Parent = part
endEnum.Technology.FutureShadowMap