How to add custom lighting properties to your map

credits go to @/LimeVendetta because i found out about this from them


Steps

  1. Under the Lighting folder, create a new Folder.
  2. Name that folder “Effects”.
  3. In here you can add the following lighting effects:
  • BlurEffect
  • ColorCorrectionEffect
  • DepthOfFieldEffect
  • SunRaysEffect

Not sure what these effects do?

Blur

The BlurEffect applies a gaussian blur to the entire rendered game world.

Original:


With Effect:

ColorCorrection

The ColorCorrectionEffect adjusts scene color properties such as saturation, tint color, or contrast. Use this effect to enhance an environment’s appearance or create a specific mood (spooky, calm, etc.).

Original:


With Effect:

DepthOfField

The DepthOfFieldEffect simulates a camera lens by blurring parts of a scene not in focus. Distant objects can be blurred or this effect can be used to focus on specific parts of a scene.

Original:


With Effect:

SunRays

The SunRaysEffect renders a halo of light, complete with rays around the sun that move based on ClockTime or TimeOfDay . The effect is shaped by objects in the world between the player’s camera and the sun, allowing for realistic visuals of light and shadow.

With Effect:


Hope this helps.

2 Likes

Quick note adding onto this: Atmosphere isn’t able to be added with this method (I think). You need to use LocalEventScript for that.

4 Likes

also you need to rejoin if you want the normal fog back because atmosphere doesn’t go away after loaded (unless another script deletes it somehow)

1 Like

why all N/A :pensive:

1 Like

i was in school :pensive:

i was in school :pensive:

wait i already sent this LOL

you was in school 2 times in same day? wow thats a record!

2 Likes

Marred Dreams have DepthofField Effect

1 Like

Lmao the bloom effect gets ruined when you play the map in-game due to FE2 already having a bloom effect in the game causing very bright neon glow with 2 bloom effects on.

1 Like

oh right haha

added pictures

so, If i use localeventscript, will the effect removable when switched map?

Idk if others effects works, but Bloom doesnt work like that. You need to make a LocalEventScript for that

1 Like

ah okay

Hello, can u give the script of ColorCorrection

1 Like

sorry but i cant really help you with that you’ll have to find someone who can

--Lighting
local Lighting = game:GetService("Lighting")

local alive = true

    local Bloom = Instance.new("BloomEffect", game.Lighting)
    Bloom.Size = 40
    Bloom.Intensity = 0.45
    
    local ColorCorrect = Instance.new("ColorCorrectionEffect", game.Lighting)
    ColorCorrect.TintColor = Color3.fromRGB(255, 219, 208)

	local SunRays = Instance.new("SunRaysEffect", game.Lighting)
	SunRays.Intensity = 0.3
	SunRays.Spread = 1

	Lighting.EnvironmentDiffuseScale = 0.3
	Lighting.EnvironmentSpecularScale = 0.75
	Lighting.ShadowSoftness = 0.045
	
character.Humanoid.Died:Connect(function()
    alive = false
end)

while wait() do
    if alive == true then
		SunRays.Enabled = true        
		ColorCorrect.Enabled = true
		Bloom.Enabled = true
    elseif alive == false then
        ColorCorrect:Destroy()
		Bloom:Destroy()
		SunRays:Destroy()
		game.Lighting.EnvironmentDiffuseScale = 0
		game.Lighting.EnvironmentSpecularScale = 1
		game.Lighting.ShadowSoftness = 0.5
    end
end

So basically all we are doing is just using an Instance.new function to create the effects. We parent it to Lighting so that you can actually see the effects lol

The other stuff like ‘alive thing’ is just to remove the effects so that they don’t appear in the lobby. Sorry if I’m not explaining this well to you, I’m bad at explaining things in general.

Oh yeah add these variables to the top of the script lol
local Map = workspace.Multiplayer:WaitForChild(“Map”)

local Players = game:GetService("Players")

local player = Players.LocalPlayer

local character = player.Character or player.CharacterAdded:Wait()

character:WaitForChild("Humanoid")



i found it

2 Likes