Req: Light 'Switches' (ie. toggle active on/off)

Following this inquiry from a few years ago: Toggling lights on/off - #3 by tekt

I would like to see an ON/OFF switch for lights. Most of my lights use a float for the dimmer par because small adjustments are easier to do there vs using the color par, so it would be nice to get a separate par (or flag) for whether the light is active.

Currently I have to multiply the dimmer by 1 or 0 via an expression referencing some chop or custom par.

Furthermore, I’m unsure whether a light with dimmer = 0 is eating up GPU cycles, so an ‘Active’ toggle may add peace of mind in that sense also.

very much +1 on this, when debugging shading / performance issues or working on a shot composite one light at a time, it’s very useful to totally mute a light with out changing the dimmer (the value may be important)

also giving an active toggle would allow for some runtime optimization like = me.par.dimmer > 0 where the light could be disabled when it’s contribution is effectively 0.

Granted, I think changing lights recompiles shaders in the backend so at present so this might introduce momentary frame drops.

in the mean time, here’s a solution I use a lot employing op find DAT to build a list of lights, and the op FIND excludes light COMP’s who’s render toggle is off.

elegant hack since the render toggle is rarely used for lights. The results in the op find DAT can just be piped into the lights parameter of the render top with a one liner like this:


opFind_GatherLights.1.toe (6.6 KB)

1 Like