View Full Version : Proximity Shading Network?


Medicine Horse
06 June 2009, 02:10 AM
I was wandering if any shader wizards out there can help me getting my head around writing a shading network that would shade a surface based on how close an object is to it. I'm really only looking for a spherical based gradient depending on how close object A gets to object B.

I've seen a shading network on highend 3D which use an expression, samplerInfo and setRange to do this but I cannot get the logic.

Any help or ideas to how to make this work would be greatly appreciated.

Thanks

MasonDoran
06 June 2009, 01:31 PM
use the Distance Tool to drive a SetDriven key that controls the individual colors of the spherical ramp

Medicine Horse
06 June 2009, 02:58 PM
Interesting. Thanks for this tip I'll try it out today.

Theodocious
06 June 2009, 05:25 PM
use the Distance Tool to drive a SetDriven key that controls the individual colors of the spherical ramp

that's a cool idea for something I was working on too.

If it doesn't have to be interactive/live you could cheat it by animating the texture by hand in aftereffects and then using your image sequence... might have a little more control in the long run and you could do bump maps etc that way.

If you figure it out I'd love to see your script!

Medicine Horse
06 June 2009, 06:43 PM
Yeah I can actually script what MasonDoran suggested pretty easily. I'm still looking to figure out an advanced method that would use nodes only. Anything I come up with I'm willing to share as I am getting help to make this work.

CGTalk Moderation
06 June 2009, 06:43 PM
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.


1