View Full Version : Transparency Based On Distance

10 October 2005, 02:41 PM
Is there any way to set up a shading network that lets you define how transparent an object is based on the distance from a camera or the distance between two locators?

10 October 2005, 04:09 PM
This might not be the easiest way, but here goes:

You can go to Create > Measure Tools > Distance Tools and snap the locators to your objects. Then parent them so they move with your camera and geometry. This creates a distanceDimensionShape node that can output distance. Connect that to a multiply/divide node to control how transparent it is at that distance and plug M/D into transparency.

Attached an example scene.

You could also just create the locators without the Distance tool and plug their world position into the other distance node that is in hypershade.

10 October 2005, 04:26 PM
Cool, thanks for the reply. That works for sure, but I guess what i'm trying to do is make it so that the front of the object is more transparent than the back. With your technique, it's just one transparency value per object.

10 October 2005, 06:30 PM
you could try this...

CGTalk Moderation
10 October 2005, 06:30 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.