Control an object's specularity with distance (CYCLES) I've asked this question before for a previous version of my Earth project but, annoyingly, after returning to find the answer, it was for Blender Internal and not Cycles. I returned last night to start a new with Cycles instead and it's looking great however I need the specularity on the ocean to dissipate when the camera is further from the planet like in reality.

Blender Internal answer:
Control an object&#39;s specularity with distance

I want to achieve the same thing but in cycles however I'm not entirely sure how to accomplish this with the vastly different node tree I have in cycles.



The red highlights the node setup given in the link above for Blender Internal.

The blue highlights the specular map of my Earth.

I'm not sure how I can or even if I can use this to achieve this. I hope someone can help me with this small blunder as I'm no expert on nodes so some pointers would be great!

Thanks to all who help me with this question!
Managed to figure it out and not entirely sure how I missed it! Here it is for those who might want to know how. I used the same set up highlighted in red and plugged them into the Glossy BSDF shader. I had to reverse Subtract, Multiply in the setup nodes as the specularity would fade out upon closing in on the Earth and not moving away.



I also fixed up the cloud map as missed something out. Looks nice a populated with them now.