create black &white shader depending on distance


#1

Hi, is there a way to create a shader with two colors black and white and blend them togehter depending on the distance of each part of the mesh to an object or locator.

I want to animate the colors of a complex cable tree beginning in the center going to the outside of it. Is there any way to do this with utilitie nodes in maya?

thanks


#2

Easiest way out of my mind is to do a projection map from above and animate a ramp.


#3

that would be a 2D Projection linear animation,what I want is an animation which is expanding in 3D Space.


#4

I had to play a little bit. I created a locator where I wanted to begin the animation. Here are the connections:

locator.translate > distanceBetweenNode.Point1
samplerInfoNode.pointworld > distanceBetweenNode.point2
distanceBetweenNode.distance > remapValueNode.inputValue
remapValueNode.outValue > ramp.VCoord
ramp.OutValue > lambert.incandescence


#5

This old school method only works with Maya Software render as it’s setup. But maybe you could break it down and make it work with your renderer of choice. Just assign the surface shader to all your objects and scale the implicit sphere to get spherical 3d falloff.
Credit for this baby goes to Boaz Livny. He deserves a shout out for this node rocking.

If you can use SOUP you could probably do some color stuff with the bounding objects. But I am far from a SOUP-master and couldn’t just spell it out without playing a bit.

Hope that helps…The big question is: Why isn’t there a 3D ramp!?

** EDIT: Ha, we posted at the same time…looks like you figured it out.


#6

Seems that it is pretty much the same solution :slight_smile:

Nice hint with Soup, I ll check it out.


#7

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.