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.

1 Like

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.active = 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:

``op(‘opFindDat’).col(0)[1::]```

opFind_GatherLights.1.toe (6.6 KB)

3 Likes

Wondering if this is being considered by any chance :pray:

1 Like

+1 it would be nice to switch lights on and off easily, without messing up with the “lights” parameter of the render top.

nice solution! will be using that too for the moment

I use them a ton for positioning my lights in a scene without using geometry viewer, as my geometries are being pulled from multiple locations into the render top :slight_smile:

+1, this is desired.

+1!!!
It could be vary useful!