Edit Lights Per aov Light Group #5264
Replies: 1 comment 1 reply
-
Hi, The trick to make that approach general purpose is to filter the ShaderTweaks node to all lights in the scene (or at least all the lights that you may want to affect). Then when Gaffer computes the tweak for each light, the Spreadsheet is able to output the specific values for the row matching its light group, falling back to the Default row for light groups that don't match. You can use a SetFilter filtering for the "__lights" set as a way of targetting all the lights in a scene. I've attached an example (lightGroupTweak.zip) tweaking some Cycles spot lights based on their light groups, with the lights in the "spotLeft" and "spotRight" light groups being tweaked. The light in the "spotRear" light group remains unaffected as without a matching row it will fall back to the Spreadsheet's Default row, which has both tweaks disabled. Cheers, M |
Beta Was this translation helpful? Give feedback.
-
Hello,
In the Contexts and Spreadsheets video on Vimeo, you mention being able to edit light parameters (via a ShaderTweak node) per aov light group. I have been looking into this as it would be great for our workflows however it does not actually seem possible based on the info shown in that example... The ShaderQuery Node chooses a row in the Speadsheet Node to edit the light shader parameter based on the ligthGroup value. However the ShaderTweak node applies to the lights based on the filter not the spreadsheet.. Maybe I misunderstood the explanation, but it seems to me that you can chose a value based on aov lightGroup however you can not filter which lights are effected based on that value??
I am only a few days into learning Gaffer, so maybe I am missing something here?
Beta Was this translation helpful? Give feedback.
All reactions