PDA

View Full Version : Distance to Camera Transparency



tcoursey
11-28-2012, 12:27 PM
Is there a plugin or method that one could implement a distance to camera transparency for an object? I'm familiar with the distance to camera as a layer in the texture editor. I would want the function to look at distance in every angle not just X Y or Z.

Thoughts?

Sensei
11-28-2012, 01:17 PM
I have no idea what is "camera transparency".

But regular distance is simply doing math:

distance = Length( vector1 - vector2 );

Which can be done using nodes:
Math > Vector > Subtract
and Math > Vector > Length
or simply Math > Vector > Distance

Vector can be const (Const > Vector)
or it can be some item position ( Item Info > Item Info > World Position)
or it can be currently evaluated spot (Spot Info > Spot Info > World Position)

Example:
make null
get it position
plug to distance node
second vector for distance take from spot info world position
output from distance plug to Color, Diffuse or whatever
start moving null above surface.

tcoursey
11-28-2012, 01:28 PM
Sorry about that. "Distance to Camera" applied to the transparency channel. Is a more accurate way to describe what I was thinking.

I'll check out the methods you've mentioned. Not good with Nodes and not any better with Math :)

Thanks for the direction, I'll play around.

XswampyX
11-28-2012, 01:34 PM
Here you go...

109465

zardoz
11-29-2012, 03:53 AM
tcoursey, the distance to camera gradient in the layers works radially...so if you have a plane (ground) and you add this to the transparency channel with some distance to camera you can see that it works radially

Axis3d
11-29-2012, 11:01 AM
A simple, non-nodal way of dissolving an object based on the distance to camera is to open op the objects Property panel. Under the Render tab, check Distance Dissolve. Then mess with the Max Distance setting to get your object to dissolve away. Your object will be completely dissolved away at that setting / distance.