Camera-Data Node?

Hello,
i tried in the actual cvs the new camera-data-node. I tried to connect the distance via a color-ramp into the factor of a mix-node (to mix two materials in relation to the distance from the camera)… but doesn’t work )-:

Any help… Thanx
S.

Hmm, I can’t even find in the CVS logs when this was added.

I have no idea how it’s supposed to work :frowning:

Do you have any further info on it ? :confused:

Mike

it’s an node, which outputs the information of the view distance. i thought, i could take that distance and transform the value with a color ramp, like i can do it in a compositing…?

Yep, it’s because the values you get out of the camera distance node are very high and wide (relative to the scene). You need some way to scale them down into a range of 0.0-1.0 to make them useful for materials. There are a few ways to do this, but ‘Squeeze value’ node is quite useful here. It ‘squeezes’ down wide ranges into a 0.0-1.0 range.

http://mke3.net/blender/etc/squeeze_value.png

Thanks for the example, that explains things a bit.

What would be a useful / cool example for using it ? :slight_smile:

Is there a way to see what numerical value the Squeeze Node (or any other node for that matter) is outputting (other than running a debug version of Blender in a debugger :slight_smile: ) ?

Mike

many, many thanks…

S.

Ha, ha, cheap SSS.

I have plotted the resulting values for two different Widths and a center of 0.

HTH

http://upload.wikimedia.org/wikipedia/commons/7/7b/Blender3D_Squeeze-Value-Node-Explained-2.49a.png

http://de.wikibooks.org/wiki/Blender_Dokumentation:_Material-Nodes/_Convertor/_Squeeze_Value