Any solutions to batch turn off/on all the lights in the scene

Say if I get hundreds of scenes and there are tens of lights in each scene, I need to turn off all the lights for all the scenes, what should I do?

Are they dynamic lights? If so just use an actor iterator in CPP or Blueprints and turn off every light.

If they are static lights, the baked lighting will still be there, so you’ll have to be more creative. We turn lights off in baked scenes by adjusting PostProcessVolume settings. This turns the lights out on a static lighting scene fairly convincingly by simple gamma change:

_postProcessVolume->Settings.ColorGamma = FVector4(0.2, 0.2, 0.2, 1);

Finally if you have any emissive materials (such as the light source meshes) you may want to adjust those. If you roll a light and its emitter mesh into a game class you can manage both right there.

1 Like

In blueprints:

1 Like