Some months ago I watched this video of Blenderguru about "How to create a realistic earth in blender". In this video blender render is used and now that I understand texturing in cycles a little better I am trying to rebuild this "realistic earth" with cycles.

enter image description here

In the video - starting at about 11:30 min - it is shown how to map the "earth day" and "earth night" image textures. Depending on the lights shining on the earth the earth or night image is projected. I tried to rebuild that in cycles but I think I a making mistakes. In the circled box the "night" nodes are found. What Is my mistake ?

P.S When you see other mistakes in this node tree, please let me know.

OK ... I now have implemented the advice of Uncle Snail (except moving the black slider). Below an image of the earth and the updated node tree (I also rearranged nodes for better overview).

enter image description here

In the Color Ramp, I did not move the slider. Is that really necessary ??

enter image description here


1 Answer 1


Plug the output from the texture into the color ramp node.

That should do the trick.

Here's how it works.

When you output an image (black and white in this example), the white values stand for 1, and the black values stand for 0. Therefore, when you plug an image texture that is black and white (like that of the lights, all the white will be 1, and all the black will be 0. In this case, the white is where there are lights, so you want to mix with an emission shader. A value of 1 (white on the texture) will mix completely, and a value of 0 (black) will not have any light.

The color ramp node, is simply for mapping how much of the texture is 1, and how much is 0. When you plug a value it, 1 (white) will be all the way to the right, and 0 all the way to the left. All in between is the values between 1 and 0. If you change the color at the right to grey, all that used to be white (1) will now be grey (0.5).

This way, if you drag the black slider almost right up to the white end, there will be no light until the texture becomes very white.

Here is an illustration. On the right, the lesser lights are cut out, so just the powerful ones shine through. This is done by the color ramp. enter image description here

Also check out Gleb's tutorial. It is a good example. Just watch how he uses it.


In your case, I wouldn't use it, except you may not want there to be as much light, then use it maybe. Just preference.

However, if you look, where there is not light in the texture, it is not completely black, so you may want to turn up the bottom a little bit, to crush all low values to 0. (like this) [example uses white as input for emission, not color as input, making the lights more prominent (which is what I would do when making a globe).]

enter image description here

  • $\begingroup$ In the video blender guru first adds another node and connects that to the color ramp. I thought I would simulate that node by adding a Diffuse Node with color white. Are you sure that I should connect the Texture to the Color Ramp ? $\endgroup$
    – Old Man
    Jan 20, 2016 at 14:24
  • $\begingroup$ I updated my question. In the Color Ramp, I did not move the slider. Is that really necessary ?? $\endgroup$
    – Old Man
    Jan 20, 2016 at 14:46
  • $\begingroup$ Yes! When you take the output from a texture, it is a color, which can be converted to a number. The output from a shader, is like a surface (it's a different output), and is not a color. The only thing you should ever be plugging a shader into is an output (except in advanced situations) (and into mix/add shader) [A shader translates the color into a method for the color to be displayed (shiny or dull), so is only needed for the output]. About the color ramp, no, it is not necessary. (short answer) I will update the question for a longer answer. $\endgroup$ Jan 20, 2016 at 16:32
  • $\begingroup$ I have updated the answer. $\endgroup$ Jan 20, 2016 at 16:52
  • $\begingroup$ Also, you may want to use a color ramp to turn all the places without lights to black, as that texture is not black in those spots (second illustration). $\endgroup$ Jan 20, 2016 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.