Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blend colors based on direction and distance of a object

7 REPLIES 7
Reply
Message 1 of 8
tsimonato
752 Views, 7 Replies

Blend colors based on direction and distance of a object

Hello guys,


I am trying to reproduce something like that with Arnold. Do you have any ideas how I could do that?


I need to blend two colors based on the distance and the direction of a given object.

I have this example done in Vray using vrayFalloff.

distanceAndDirection_web2.gif


Thank you so much!

Tags (2)
Labels (2)
7 REPLIES 7
Message 2 of 8
Stephen.Blair
in reply to: tsimonato

You can use a vector state to get P (shading point position in world space).

What's the direction of the object?



// Stephen Blair
// Arnold Renderer Support
Message 3 of 8
tsimonato
in reply to: tsimonato

Hello Stephen,

How can I use the Vector State?

The idea is to blend two colors based on the distance and the position of a locator. The locator will control the direction of the gradient. No need of normal information or shadow. Only a flat gradient.


Message 4 of 8
Stephen.Blair
in reply to: tsimonato

You take one of the coordinates, like Y for example. Feed that into a range node, and then into the mix weight.



// Stephen Blair
// Arnold Renderer Support
Message 5 of 8
tsimonato
in reply to: tsimonato

Hello Stephen,

I tested and that is not exactly what I need. That goes only on one axis.

I just need a simple radial gradient. Exactly if it were light, but without information of Normals, Shadows, and Volume. The GIF represents pretty well.

distanceAndDirection_web2.gif

Thank you 🙂

Message 6 of 8
Anonymous
in reply to: tsimonato

you should be able to do this with state vector P and length

Message 7 of 8
Anonymous
in reply to: tsimonato

distance_shader.zip

here is an example file, note that distance cant be infinite, I have placed an aiRange node, in that Input Min and Max will be your distance control.

Message 8 of 8
tsimonato
in reply to: tsimonato

Hello Bhavesh,
That is exaclty that what I needed!

Thank you so much!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report