1
$\begingroup$

enter image description here I have these squares that spin 90 degrees when the falloff passes over them, I want them to change color from blue to magenta at the same time, I've made this array to clone one and got the color to work but it's only effecting the first one since they are all using the same material. How do I do this?

I either want to color the emission node using the falloff OR Change color along with the 90 degrees of rotation

Rendered in cycles

I would love some help with this! :)

$\endgroup$
2
  • 1
    $\begingroup$ Use the Object Color Output node which allows setting viewport color per object. $\endgroup$ – 3DSinghVFX Mar 2 '20 at 19:40
  • $\begingroup$ How would I implement that? $\endgroup$ – TECHGUNK Mar 9 '20 at 8:30
2
$\begingroup$

You can make use of the "Viewport Color" property of each object, since this property can be accessed in any shader.

See my answer here for more information : https://blender.stackexchange.com/a/163699/86891

In your animation node tree, you need to add an "Object Attribute Output" set to "color" :

enter image description here

Edit :

As of V 2.1.7, thanks to 3DSinghVFX there is a node specifically for this : The object color output.

enter image description here

Then access it in your shader :

enter image description here

These two objects share the same shader, but I am modifying the left one's color in my animation nodes tree :

enter image description here

In order to change each individual object's color, use this setup :

enter image description here

Don't forget to tweak the "Evaluate Fallof" node to output a list instead of just one value. You need to click on the button on the right of the "location" field in this node. Notice how it is blue tinted. Result :

enter image description here

$\endgroup$
7
  • $\begingroup$ Okay, but how could I connect that to a falloff for example? I want everything inside the falloff to be one color and outside, another. Thanks for the help! :) $\endgroup$ – TECHGUNK Mar 6 '20 at 8:26
  • $\begingroup$ Super thanks! one step closer! I think I've missed something due to it still only reacting with the first copy, what have I missed? imgur.com/a/RkIzQK4 $\endgroup$ – TECHGUNK Mar 11 '20 at 12:56
  • 1
    $\begingroup$ @TECHGUNK Yeah, this isnt super obvious ! You need to tweak the "Evaluate Fallof" node to output a list instead of just one value. You just need to click on the button on the right of the "location" field in this node. Notice in my screenshot it is blue tinted. After that you can get rid of the "create float list" node since it is superflous $\endgroup$ – Gorgious Mar 11 '20 at 16:40
  • 1
    $\begingroup$ also don't forget to link your object's positions in the evaluate fallof node else it will be evaluated will the default 0,0,0 position $\endgroup$ – Gorgious Mar 11 '20 at 16:42
  • 1
    $\begingroup$ @TECHGUNK Great !! Happy to have helped you $\endgroup$ – Gorgious Mar 11 '20 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.