Short and simple. I’m trying to create a few specific areas of my game to be completely dark. Here’s what I mean:
The image above is what the building currently looks like.
This image is what I would like it to look like:
(I achieved the second image by changing the skybox to black, but that won’t work. I have other buildings and areas that rely on the lighting I have right now, and changing the skybox would ruin the game. I tried using fog meshes from the toolbox but they didn’t look good.
The building is made of unions, and it is all PBR. The lighting is on Future, and here are the lighting settings:
If anyone knows how I could get it to be like the second image WITHOUT effecting the current lighting (at least not to much), please let me know.
2 Likes
The only way that I know of is to add a large part on top of the structure you want to darken. This won’t work if you have areas you want the player to access on top.
1 Like
Sadly, it’s packed together. Can’t fit anything else in.
Dev_JayR
(JayR)
May 10, 2022, 11:55pm
#4
Why not just make everything completely dark (change the GlobalBrightness to 0, ToD to 21, etc), and then brighten up the areas that you want to be bright (using PointLights, SpotLights, etc)?
I’m in the process of trying that now, but surface lights range are not far enough to cover my entire height of the build.
1 Like
ZINTICK
(ZILLY)
May 11, 2022, 12:06am
#6
you could maybe use a script to achieve different light setting in different areas
1 Like
RMofSBI
(RMofSBI)
May 11, 2022, 12:15am
#7
Use a fog particle emitter and slow the speed down drastically and change the color and light and texture settings to mimic darkness.
1 Like
ZINTICK
(ZILLY)
May 11, 2022, 12:15am
#8
local Lighting = game.Lighting
local skyBox = Lighting.DarkSkyBox
local darkPart = workspace.darkPark
local lightPart = workspace.lightPart
local character = script.parent
local head = character.Head
head.Touched:connect(function(Hit)
if Hit.name == "darkPart" then
-- insert lighting settings
Lighting.Skybox.Enabled = true
end
if Hit.name == "lightPart" then
--insert lighting settings
Lighting.Skybox.Enabled = false
end
end)
ZINTICK
(ZILLY)
May 11, 2022, 12:16am
#9
just tell me the lighting setting when you want it not you want it not dark
@SimonEnderB yes it would be in there it would also be a local script if this game is for more then one player
I assume this is a local script in StarterCharacterScripts?
1 Like
ZINTICK
(ZILLY)
May 11, 2022, 12:21am
#12
your also gonna have to make your own parts named darkPart and lightPart they cant be ina model but the can be unions
1 Like
ZINTICK
(ZILLY)
May 11, 2022, 12:23am
#13
You said that you have a back skybox you can change that too
ZINTICK
(ZILLY)
May 11, 2022, 12:28am
#14
I edited my script it should disable and enable the skybox rn it wont work bc i need those settings
I got something working here:
local Lighting = game.Lighting
local darkPart = workspace.darkPart
local lightPart = workspace.lightPart
local character = script.parent
local head = character.Head
local sky = Lighting.SkyLight
head.Touched:connect(function(Hit)
if Hit.name == "darkPart" then
sky.SkyboxBk = "http://www.roblox.com/asset/?id=2675785344"
sky.SkyboxDn = "http://www.roblox.com/asset/?id=2675785344"
sky.SkyboxFt = "http://www.roblox.com/asset/?id=2675785344"
sky.SkyboxLf = "http://www.roblox.com/asset/?id=2675785344"
sky.SkyboxRt = "http://www.roblox.com/asset/?id=2675785344"
sky.SkyboxUp = "http://www.roblox.com/asset/?id=2675785344"
Lighting.Brightness = 0
end
if Hit.name == "lightPart" then
sky.SkyboxBk = "http://www.roblox.com/asset/?id=6444884337"
sky.SkyboxDn = "http://www.roblox.com/asset/?id=6444884785"
sky.SkyboxFt = "http://www.roblox.com/asset/?id=6444884337"
sky.SkyboxLf = "http://www.roblox.com/asset/?id=6444884337"
sky.SkyboxRt = "http://www.roblox.com/asset/?id=6444884337"
sky.SkyboxUp = "http://www.roblox.com/asset/?id=6412503613"
Lighting.Brightness = 3
end
end)
Not very efficient, but it works good for me.
2 Likes
ZINTICK
(ZILLY)
May 11, 2022, 12:37am
#16
Good job bro nothing i can see wrong
ZINTICK
(ZILLY)
May 11, 2022, 12:38am
#17
its in a local script correct?
Yes
(30 thing limit blah blah)
1 Like
--Local
local Char = script.parent
local Hum = Char.Humanoid
--Lighting
local Lighting = game:GetService("Lighting")
local Sky = Lighting:FindFirstChildWhichIsA("Sky")
local LightingTable = {
["DarkPart"] = function()
Sky.SkyboxBk = "http://www.roblox.com/asset/?id=2675785344"
Sky.SkyboxDn = "http://www.roblox.com/asset/?id=2675785344"
Sky.SkyboxFt = "http://www.roblox.com/asset/?id=2675785344"
Sky.SkyboxLf = "http://www.roblox.com/asset/?id=2675785344"
Sky.SkyboxRt = "http://www.roblox.com/asset/?id=2675785344"
Sky.SkyboxUp = "http://www.roblox.com/asset/?id=2675785344"
Lighting.Brightness = 0
end,
["LightPart"] = function()
Sky.SkyboxBk = "http://www.roblox.com/asset/?id=6444884337"
Sky.SkyboxDn = "http://www.roblox.com/asset/?id=6444884785"
Sky.SkyboxFt = "http://www.roblox.com/asset/?id=6444884337"
Sky.SkyboxLf = "http://www.roblox.com/asset/?id=6444884337"
Sky.SkyboxRt = "http://www.roblox.com/asset/?id=6444884337"
Sky.SkyboxUp = "http://www.roblox.com/asset/?id=6412503613"
Lighting.Brightness = 3
end,
}
Hum.Touched:connect(function(Hit)
if LightingTable[Hit.Name] then
LightingTable[Hit.Name]()
end
end)