Camera distance influence on alpha

09 February 2015 12:31
I would like to re-use the camera distance input used on your marker material (on the helicopter scene for exemple), in order to fade out the material when the camera gets closer to the object.
But I struggle to understand how the settings influence the behaviour of the material!

How to set up the "Width" and "Center" values, what do they represent? What is the output of this node group (values - range?)
Thanks for your help!

David Duperron
STAT Marine -
09 February 2015 15:18
This node works like color ramp - it helps to control the blur to make it more "harder" or "softer" and to adjust border. Width represents the "powes of blur" and center represents the border where this blur will start. Documentation on Blender Wiki

But this node is somewhat heavy, so I recommend to try our special nodegroup SmoothStep - it works a little different, but is faster when it comes to performance. Here is documentation to it.

I made an example of different usage of those nodes :)


3D Generalist, contests administrator,
Blend4Web team.
art blog:
09 February 2015 15:57
Ok thanks for these explanation and advice!
But my problem is more to understand how to adapt this to the desired effect: the material disapperas when the camera gets close enough…
Let's say when the camera is at 3 blender units (and below) from the shading point (view distance output from Camera Data node) I want the material totally transparent, and at 5 blender (and above) units totally opaque… what do I put in the Edge0 and Edge1 values??
David Duperron
STAT Marine -
09 February 2015 16:05
My bad… I just found the answer myself… by setting the Edge0 to 3 and the Edge1 to 5 I have got what I need… that's perfect. Once you get used to them, these material nodes are awesome!!
David Duperron
STAT Marine -
Please register or log in to leave a reply.