# How To Make An Object Fade As Another Intersects With It?

I have a basic cloud texture on a plane, this is my node set-up: https://i.imgur.com/dqLENEa.png.

My question is; How do I conserve this node set up while also adding a geometry intersect fade node set up? I want the cloud to fade to total transparency the closer an object gets to it's proximity. I would also like the object to fade away the closer the camera gets to the plane. And also, this may be a very simple one, but how would I achieve a transparent circular mask over the cloud so that the edges are transparent in a circular shape? Thanks guys!

• you can use compositing by alpha over – SHikha Mittal Sep 21 '20 at 4:13
• Can you elaborate and help me out with this? I work in Cycles. Any node set up would be very helpful. – KingKong19100 Sep 21 '20 at 6:39
• i think lemon has a good point – SHikha Mittal Sep 21 '20 at 9:27

Finding a falloff that drives the transparency depending on the camera proximity.

The node setup:

• Take the coordinates of the camera as "object" in "texture coordinates" node.
• Get its length to the mesh "vector math" using "length"
• Add a little value so that we won't reach 0 in next node
• Negative power so that the value is bigger as the length decreases
• Tweak the curve using "vector curve" on X: small values are 1 and bigger values have a falloff to 0 rapidly
• Get the X component tweaked above
• Multiply the result with the value that already drives the cloud transparency, so that transparency is due to both the texture and the result of the proximity

You may have to tune values and curve depending on your cloud/plane configuration and size.

• Thank you so much! You definitely answered my second question, but how can I adjust it so that all geometry that intersects the object makes it fade? Thank you! – KingKong19100 Sep 21 '20 at 19:16
• Well, this is supposed to do it. Could you illustrate what is fade for you? – lemon Sep 21 '20 at 19:39
• The same exact thing you illustrated above with the cloud and how as the camera gets closer, it fades to complete transparency. What I want to do is have this cloud fade away if ANY object intersects with it. So instead of the camera here, it would work for any object it gets close to. – KingKong19100 Sep 21 '20 at 23:06