AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Materials / Link shader color to object transforms?
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

Link shader color to object transforms?
Rate this thread
 
66267
 
Permlink of this thread  
avatar
  • Total Posts: 21
  • Joined: 24 August 2006 08:33 AM

Hello everyone; I have a rather odd problem, in that I’d like to be able to link a polygon object’s rotation attribute to drive the color attribute of a shader.

Specifically, When the arrow’s Rotate X = 0, the object should be green. When Rotate X = 180, it should be red. Any amount in between would be a blend of the two colors.

I’m thinking possibly a setRange node to remap channels, but I’m not really sure how to link all of this up. Any suggestions?

Thanks ahead of time!



Replies: 1
/img/forum/light/default_avatar.png

Looks like I solved my own problem exactly how I proposed, heh.

Linked Rotate X to both Value X and Value Y of a setRange node.

Old Min X = -180, Old Max X = 0
Old Min Y = -180, Old Max Y = 0
Min X = 0, Max X = 1
Min Y = 1, Max Y = 0

Linked Out Value X to Color R of the shader, Out Value Y to Color G

Author: haftarun8

Replied: 18 April 2012 09:53 AM  
avatar

You could also just use a blendColors node - put a red ramp in for color1 and a green ramp in for color2, and connect the blender to the rotateX channel using Set Driven Key



Replies: 0