关于 roblox-lighting
用于配置 Roblox 光照、氛围、后期处理和昼夜循环的实用技能,适合调整 Studio 场景的创作者,并提供属性示例及性能注意事项。
主要功能
- 01Lighting 服务属性示例
- 02Atmosphere 配置
- 03后期处理效果设置
- 04昼夜循环示例
- 05局部光源与性能指导
适用场景
- 01设置场景时间和环境光照
- 02添加雾效或后期处理效果
- 03构建昼夜循环
- 04检查可见阴影光源的性能影响
MCP 相关
技能介绍了 MCP 工作流程:检查光照、进行最小修改、捕获结果并检查性能。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ tabooharmony/ roblox-brain --skill roblox-lighting安装后在 Claude Code 中输入/roblox-lighting确认已加载。
附带文件references/full.md
详细介绍
Roblox 光照与大气效果
何时加载
用于 Roblox 光照、大气效果、昼夜变化或后期处理(Bloom、ColorCorrection、DepthOfField)。
快速参考
Lighting 服务
Lighting.ClockTime = 14 -- 0-24 numeric
Lighting.Brightness = 2 -- 0-10, default 2
Lighting.Ambient = Color3.fromRGB(70, 70, 70) -- shadow fill
Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
Lighting.GlobalShadows = true
Lighting.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
local atmo = Instance.new("Atmosphere")
atmo.Density = 0.3 -- 0=clear, 1=opaque (keep <0.5)
atmo.Offset = 0.25 -- 0=ground, 1=sky
atmo.Color = Color3.fromRGB(199, 199, 199) -- near fog
atmo.Decay = Color3.fromRGB(92, 92, 92) -- far/horizon
atmo.Glare = 0 -- 0-10
atmo.Haze = 0 -- 0-10
atmo.Parent = Lighting
后期处理(均设为 Lighting 的子项)
| 效果 | 关键属性 |
|---|---|
BloomEffect | Intensity(0-1)、Size(px)、Threshold(推荐 >0.7) |
ColorCorrectionEffect | Brightness、Contrast、Saturation(-1 到 1)、TintColor |
DepthOfFieldEffect | FarIntensity、FocusDistance、InFocusRadius、NearIntensity |
SunRaysEffect | Intensity(0-1)、Spread(0-1) |
昼夜循环
local CYCLE_SPEED = 1 -- minutes per full day
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)
局部光源
| 光源 | 用途 | 关键属性 |
|---|---|---|
PointLight | 灯、火把 | Range、Brightness、Color |
SpotLight | 手电筒 | Range、Angle、Face |
SurfaceLight | 屏幕、面板 | Range、Angle、Face |
性能: 将投射阴影的可见光源限制为 4-6 个。大多数光源使用 Shadows=false。Neon 材质可低成本实现发光效果。
MCP: 检查、尽量少改动、捕获并检查性能。
常见问题
- Brightness >3 会导致画面泛白。Density >0.5 会显得浑浊。后期效果最多使用 2-3 个。
- 避免使用黑色 Ambient。Technology 已弃用;它及其替代项仅限 Studio 使用。
参考资料
- 氛围预设(白天、黄金时段、夜晚、恐怖、水下、科幻)、区域补间和完整示例:
references/full.md
评论
支持 Markdown