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 从公开仓库中收录这些内容。

举报或申请下架