Andrew Price showed in one of his tutorials how to use a white material node in the Blender internal render to get the brightness of a point and assign the texture accordingly.

In this case: Point is bright: assign daylight texture; Point is dark: assign night light texture

Is there anyway to reproduce that in cycles?

  • $\begingroup$ if you look through the comments on the tutorial you will see enthusiasts post screenshots of node setups for a cycles version. $\endgroup$
    – zeffii
    Jun 7, 2013 at 10:26
  • $\begingroup$ I don't think it actually works with their node setup, it is usually based on the fact, that the emission from the night texture is so weak that you don't see it during the daytime. After Brechts answer I will probably use 3 render layers. (white sphere for indication, nighttime sphere, daytime sphere) $\endgroup$ Jun 7, 2013 at 11:19

1 Answer 1


No, it's not possible to do this in Cycles, it will first evaluate the material nodes entirely, and then compute the lighting.

Supporting this would be incompatible with progressive rendering and bidirectional lighting algorithms, and so physically based render engines usually can't do this.

For the earth example, a workaround would be to use a Normal node Dot output, with the Geometry node Normal output plugged into the Normal input. If you then set the direction to match the sun light it will give you a factor than can be used for blending.


You must log in to answer this question.

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