# Where is the sqeeze value node in Cycles?

It's supposed to be here.

what I actually need to do is make a shader that mixes between shaders not colors dependent on camera distance, mixing between colors works, but using as a factor on the shader mix node doesn't, so I thought maybe I could use the squeeze value on the camera data node as mentioned here:

http://blenderartists.org/forum/showthread.php?82183-Camera-Data-Node

• That forum thread is from 2006, way before Cycles existed. Cycles never had a 'squeeze' node, but someone might be able to tell you the equivalent. Feb 26, 2016 at 11:37
• I agree with @RayMairlot, never saw that node in Cycles (while for Blender Render is still available). I would suggest to better explain what's your goal, so a workaround to "fake" it could be found. Feb 26, 2016 at 11:41

## 2 Answers

Thanks for all the help everyone, i found the solution, it wasn't working because i had the camera in orthographic mode, here i'll post a picture of the node setup that works.

Note the title of the question is now misleading, so the answer to that question was that cycles does not have a squeeze node, but the answer to how to blend between two shaders based on distance from the camera is here.

I just did some tests and it seems you can kind of simulate the Squeeze node using a combination of Multiply and a Color Ramp on the Camera Data node's View Distance or View Z Depth properties to control the shader mix factor. It takes a bit of fiddling to get right but it definitely works. I have never used the Squeeze node, so I cannot compare ease of use but I assume it would be a little easier.

In my example I scaled the default cube along the Y-axis so it was 50 BUs long and then positioned the camera at one end, pointing at the other. I then had to multiply the output by 0.02 (so that 50 would become 1) before passing it into a color ramp which I then adjusted to line up with the location of my cube, i.e. in order to have the nearest point of the cube be 100% material 1 I need to move the black slider to the position value that corresponds to the distance between the camera and that nearest point (multiplied by 0.02), then do the same for the farthest point and the white slider.

• can you add images of your node setup?
– user1853
Feb 26, 2016 at 14:31
• I already closed the project again after looking at forferdeilig's answer which is actually less fiddly than what I did and gives better results, too. Feb 26, 2016 at 14:40