Roblox Lighting

TabooHarmony/roblox-brain/skills/gameplay/roblox-lighting

作者 TabooHarmony38826be57ee37bcf023e9c2b85681bea3909281c無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Use for Roblox lighting, atmosphere, day/night, or post-processing effects.

AI 產生的概覽

用於設定 Roblox 光照、大氣、晝夜循環與後製處理效果的參考指南。

功能
此技能提供 Roblox 環境設定的速查參考:Lighting 服務屬性、Atmosphere 實體、Bloom、ColorCorrection、DepthOfField、SunRays 等後製處理效果、晝夜循環程式碼,以及區域光源類型。它也列出常見陷阱與效能注意事項,並指向包含氛圍預設、區域轉場與完整範例的更詳細參考檔案。它僅為說明文件,不附帶指令碼。
適用情境
適用於在專案中處理 Roblox 光照、大氣、晝夜循環或後製處理效果時。它用於設定或撰寫這些環境元素時的查閱參考。
執行需求
不包含指令碼,僅為說明文件。它引用 Roblox Creator Hub 文件與一個隨附的參考檔案,並假定處於 Roblox Studio 或 Luau 環境。

Roblox Lighting & Atmosphere

When to Load

Load for Roblox lighting, atmosphere, day/night, or post-processing (Bloom, ColorCorrection, DepthOfField).

Quick Reference

Lighting Service

luau
Lighting.ClockTime = 14            -- 0-24 numericLighting.Brightness = 2            -- 0-10, default 2Lighting.Ambient = Color3.fromRGB(70, 70, 70)        -- shadow fillLighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)Lighting.GlobalShadows = trueLighting.ShadowSoftness = 0.2      -- 0=sharp, 1=soft-- Configure tech/style/quality in Studio; these properties are not script-writable.-- Verify enum values and device behavior against current Creator Hub docs before setting them.

Atmosphere

luau
local atmo = Instance.new("Atmosphere")atmo.Density = 0.3    -- 0=clear, 1=opaque (keep <0.5)atmo.Offset = 0.25    -- 0=ground, 1=skyatmo.Color = Color3.fromRGB(199, 199, 199)   -- near fogatmo.Decay = Color3.fromRGB(92, 92, 92)      -- far/horizonatmo.Glare = 0        -- 0-10atmo.Haze = 0         -- 0-10atmo.Parent = Lighting

Post-Processing (all parented to Lighting)

EffectKey Properties
BloomEffectIntensity (0-1), Size (px), Threshold (>0.7 recommended)
ColorCorrectionEffectBrightness, Contrast, Saturation (-1 to 1), TintColor
DepthOfFieldEffectFarIntensity, FocusDistance, InFocusRadius, NearIntensity
SunRaysEffectIntensity (0-1), Spread (0-1)

Day/Night Cycle

luau
local CYCLE_SPEED = 1  -- minutes per full daytask.spawn(function()    while true do        Lighting.ClockTime += (task.wait() / 60) * (24 / CYCLE_SPEED)        if Lighting.ClockTime >= 24 then Lighting.ClockTime -= 24 end    endend)

Local Lights

LightUseKey Props
PointLightLamps, torchesRange, Brightness, Color
SpotLightFlashlightsRange, Angle, Face
SurfaceLightScreens, panelsRange, Angle, Face

Perf: Limit shadow-casting lights to 4-6 visible. Use Shadows=false on most. Neon material = cheap glow.

MCP: Inspect, change minimally, capture, check performance.

Common Pitfalls

  • Brightness >3 washes out. Density >0.5 = soup. Max 2-3 post effects.
  • Avoid black Ambient. Technology is deprecated; it and its replacements are Studio-only.

References

  • Mood presets (Day, Golden Hour, Night, Horror, Underwater, Sci-Fi), zone tweens, full examples: references/full.md

來源與署名

來源:TabooHarmony/roblox-brain位於skills/gameplay/roblox-lighting提交38826be

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架