Lighting Manager: Save and reload your lighting settings with ease!

Plugin link

Have you ever had that moment where you want to temporarily change the lighting in your place file, but afterwards you forget what the old settings were? Do you have a game with multiple lighting settings you constantly have to switch between but copying and pasting them is tedious and boring? Well, worry no longer!

I made a plugin which lets you save and reload lighting settings. You can give your lighting settings a name and reload previous lighting settings by selecting them. Additionally you can delete lighting settings or export them to code to make programming a little bit easier.

Quick notes:

  • This plugin also saves PostEffect objects in the CurrentCamera and Lighting.
  • The Sky in Lighting is also saved, but make sure you only have one of them.
  • When loading a setting, PostEffect objects in the CurrentCamera and Sky and PostEffect objects in the Lighting are replaced.
  • Duplicate or empty names are not allowed.
  • Settings are saved in a special folder in the ServerStorage. This folder is only created when you first save a setting. Please do not alter this folder on your own, but feel free to copy and paste them to other place files to share lighting settings between place files.

Take a quick look at this video to see the plugin in action:

63 Likes

Awesome! I often change lighting properties based on character location/area theme during run time, so this is very useful for testing themes without needing to press play!

6 Likes

Finally, I really been needing this with how much I work on lighting in games.

Thank you! I’m working on a game where different characters have different lighting and this was a GODSEND! At first i was trying to loop through properties and other things and it was a nightmare to try and figure out, but now I don’t have to!

Thanks for this amazing plugin, i’m using it in conjunction with Atmos Professional. I’m wondering how i can use the data export work with a script to change the lighting within a game. Are you able to refer me onto something which may help me do this? Thanks!

(Sorry for the necro)

Bumping due to just now using it and noticing an issue with exporting.
image
When exporting it seems you added an extra comma :sweat_smile:

1 Like

For some reason when I try to load an exported lighting modulescript, it shows up this error

Apologies for the late bump, but after searching around for a way to load lighting saved by this plugin to no avail, I’ve developed my own script that loads the modulescripts created by this plugin.
Its kind of janky, but it suits my needs.

This script does not load CurrentCamera PostEffects!

local function loadLighting(module)
	for i,v in pairs(game.Lighting:GetChildren()) do
		v:Destroy()
	end
	
	for classname,property in pairs(lightconfig) do
		if classname == "Lighting" then
			for propertyname,propertyvalue in pairs(property) do
				game.Lighting[propertyname] = propertyvalue
			end
		else 
			if classname == "PostEffects" then
				for i,v in pairs(property) do
					if i == "Lighting" then
						for j,k in pairs(v) do
							local newLightingObj = Instance.new(j)
							newLightingObj.Parent = game.Lighting
							for o,p in pairs(k) do
								newLightingObj[o] = p
							end
						end
					end
				end
			else
				local newObj = Instance.new(classname)
				newObj.Parent = game.Lighting
				for propertyname,propertyvalue in pairs(property) do
					newObj[propertyname] = propertyvalue
				end
			end
		end
	end
end

If there actually was a way to load lighting from the plugin before and I didn’t know then I wasted my time making this lol

2 Likes