1
$\begingroup$

I want to turn off a bunch of lights inside a collection using falloff in animation nodes but i cant find a node that connects the value of the light intensity to the falloff or a node that allows me to apply the falloff to all lights in the collection.

Thanks in advance for the help! :)

enter image description here

$\endgroup$

2 Answers 2

2
$\begingroup$

You need to know how to access and modify each light's energy. Then evaluate the falloff in a subprogram and tweak each light's energy.

In order to know the property's name, you have to activate "Python tooltips" in the preferences :

enter image description here

Then hover you cursor over the field :

enter image description here

So, given the point light, you access its energy with an attribute node and the path data.energy. Similarly, if you want to access the color, you would use data.color.

enter image description here

For ease of use put all your lights in their own collection.

enter image description here

Add your falloff object (I chose a cube), tweak the fallof type and connect it to your subprogram.

enter image description here

Result :

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Just like last time you come here and save my day! Thank you! <3 $\endgroup$
    – TECHGUNK
    Commented Sep 3, 2020 at 12:33
  • 1
    $\begingroup$ Always a pleasure to answer clear and precise questions :) $\endgroup$
    – Gorgious
    Commented Sep 3, 2020 at 13:36
1
$\begingroup$

We can also do this directly without using loop:

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .