5
$\begingroup$

I want the specularity of my Earth model to turn off after a certain distance from the camera as, in reality, the sun's reflection from the water soon fades the further you get from it. I want this same affect to apply to my model. Are there ways of doing this?

$\endgroup$
1
  • $\begingroup$ I remember water on satellite iages to be completely black because it absorbs the light, correct me if im wrong. $\endgroup$
    – Jonathan
    Commented Mar 30, 2015 at 15:15

1 Answer 1

6
$\begingroup$

With material nodes, you can use the Camera Data input to get the distance from the camera to the surface. Note that this number will be much higher than the 0-1 range you'd normally want for a color value, and the numbers get bigger the further the surface is from the camera, so you'll need to do some math to invert and scale this value to whatever works best for your scene.

See the image below for a sample setup in Blender Internal, but Cycles has the Camera Data node as well.

Sample node setup

$\endgroup$
1
  • $\begingroup$ That's absolutely perfect! Exactly what I needed thanks, would you be able to help me out with my night lights texture problem? $\endgroup$
    – Stewie
    Commented Mar 30, 2015 at 15:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .