Camera distance influence on alpha
09 February 2015 12:31
Hi,
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
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!
![](http://oi57.tinypic.com/29xazxe.jpg)
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
David Duperron
STAT Marine - www.stat-marine.com
STAT Marine - www.stat-marine.com
09 February 2015 15:18
Hello!
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 :)
![]()
squeeze_val_smoothstep_ex.blend
squeeze_value_ex.html
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 :)
![](https://www.blend4web.com/media/uploads/c46067fd-cca0-48c0-94dd-0df7cb225682/squeeze_value_ex.jpg)
squeeze_val_smoothstep_ex.blend
squeeze_value_ex.html
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??
Thanks!
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??
Thanks!
David Duperron
STAT Marine - www.stat-marine.com
STAT Marine - www.stat-marine.com
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!!
Cheers…
Cheers…
David Duperron
STAT Marine - www.stat-marine.com
STAT Marine - www.stat-marine.com