Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Rigging a color attribute

Rigging a color attribute

tmayoMR8N9
Observer Observer
461 Views
1 Reply
Message 1 of 2

Rigging a color attribute

tmayoMR8N9
Observer
Observer

So I'm building a control for my animator so that he can control the color of an object.  and i want to add and attribute that drives the material without having to select a different node,  anyway to do this?

 

I also have one other question, I'd like to figure out is if i can make a node like a "colorConstant" visible in the outline permanently without checking off "DAG objects only"  like an override for that filter on one node?

462 Views
1 Reply
Reply (1)
Message 2 of 2

Kahylan
Advisor
Advisor

Hi!

 

The first question depends on how you want to drive it and what kind of input that your material takes. You just have to create custom attributes on your driver node (Channelbox -> Add Attribute) that match the inputs on your driven node.
So for example if you plug into a color constant you would create the following attributes:

"Color _R" (Float, Min 0, Max 256)

"Color _G" (Float, Min 0, Max 256)

"Color _B" (Float, Min 0, Max 256)

"In Alpha" (Float, Min 0, Max 1)

And then you connect them from your driver node to the material using Windows->General Editors -> Connection Editor

 

Now if you want to blend between colors or preset textures you'll need additional nodes like blendcolors or layered Shaders or Layered Textures, so I wont go into that in detail here, if you don't need it.

 

To your second question... You can only display one DG node type when DAG objects only is checked and that's shaders by checking Display -> Assigned Materials.

However, you can create a displayable alias to a DG node by putting it into a set. (Documentation on sets: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Maya-Bas...
The set will then show up in your outliner and you can expand it to see its contents.

set.png

However, this is an alias, you deleting this, without first selecting it over the set wont delete the node.

 

I hope it helps!