PDA

View Full Version : Change texture based on distance



Philbert
02-04-2012, 09:37 PM
I can set up changing the color based on distance to a null thanks to William's excellent tutorial, but what I really need right now is to swap between two images instead of colors. I'm not having much luck, any suggestions.

Here's what I've got:
http://content.screencast.com/users/philnolan3d/folders/Jing/media/7a6e5e00-2a07-41f8-b646-37ed6f564b86/2012-02-04_2336.png

Edit: As usual I messed with it forever, then post here about it, then immediately figure it out. I just had to connect the gradient's Alpha to the images Opacity AND have the color connected.

http://content.screencast.com/users/philnolan3d/folders/Jing/media/66fc3d9e-2b6c-4231-9478-831333d27554/2012-02-04_2342.png

nickdigital
02-04-2012, 09:43 PM
Maybe drive Opacity based on null distance?

Philbert
02-04-2012, 10:59 PM
Right, that's what I did.

HolyMonkey-
02-05-2012, 08:44 AM
Do you have the link to williams tutorial?

Although, you could add a clip mask Render - Clip Mask,

Think of it like layers in photoshop only two similar objects, with different texture.

Make a gradient and do distance to object, and add in alpha through there. So that when the null is X distance close to object, then it will show the object behind.

I'm not sure that would work but worth a try I guess?

Philbert
02-05-2012, 09:04 AM
It's from this page:
http://forums.newtek.com/showthread.php?t=77002

Here's the specific video:
ftp://ftp.newtek.com/multimedia/movies/w3dw/Distance_Nodes.mov

Sensei
02-05-2012, 04:55 PM
Add two image nodes, then color mixer node, plug them in it, output from color node to Color input in Surface.
To opacity of color mixer plug output from gradient node.
To input of gradient plug output from distance.