Lighting the dark side of the earth


New member
I've seen this topic covered in some other posts but I still dont get it. I'm trying to do an earth render showing the dark side of the earth illuminated by its city lights and the light side illuminated by the sun (directional light). The nearest I have got so far is to use the nightlights image in the luminosity channel but then it also shows up as white dotd on the sunward side of the planet. I'm told there is a way in the node editor to do this but I cant figur it out. Any help greatly appreciated.

Dave Jerrard

Triglycerous Gluteous
Use a Gradient based on Light Incidence. You'll need to make sure that the light this thing points to is always available every scene you use it in though. I did this years ago in 7.5, and I even did versions of it as far back as the 5.x days (though gradients make it much more effective). Here's a frame of a sequence that used the Gradient technique. It's actually completely unrealistic since the lit side of the earth would be so bright that you wouldn't be able to see the city lights, or even the stars because they'de be too dim to show up in a single exposure. As it is, the city lights were barely even perceptible in the shot.

To get the stars and lights to show up in a real photo, the lit side would be so overexposed it would be a huge white blob, and would probably still fill teh frame with so much glare as to wash out everything else. By exposing for the lit side, you'd get the colors to look good, but stars and lights would be far too dim to register. This is why you rarely ever see a single star in photos on the moon or from the space station or shuttles.

He Who Finds That Realism In Space Is Generally Fantastic Enough Already.


  • IF2-01-01c_0765.jpg
    601.6 KB · Views: 2,063
Last edited:


Active member
I agree with Dave. I wonder if you see them if you are actually in space. Anyway, it looks cool to have the city lights to me.

Did you use HyperStars for that starfield Dave?

Last edited:


3D Mac Maniac
There wouldn't be many lights visible from space if Kim Jong-il controlled the dark side of the earth... ;)


Dave Jerrard

Triglycerous Gluteous
avkills said:
I agree with Dave. I wonder if you see them if you are actually in space. Anyway, it looks cool to have the city lights to me.
You can see them from space, but only if you're not in sunlight yourself.

Did you use HyperStars for that starfield Dave?
Nope. Just single point polygons. Actually, it's the same starfield mentioned in this other thread.

He Who Is Still Annoyed By Having Too Many Visible Stars In That Shot.
Last edited:


Relax, it's just yogurt.
Big thanks to weepful for the light incidence information.

Try something similar to this to create the effect (realistic or not, it's still kinda cool :D ) -

[larger image]
Note that Gradient (2) has the luminosity map into Key 1's color channel and nothing into Key 2 - that's the basic default black as set up by the Gradient. And the Multiply node simply boosts the Lum. info to make the effect more distinct.
The result (I dissolved out the atmosphere layer in this one)


Motion Design Lead
A simpler setup is to use a diffuse node to mask the city lights. Not only does this work with unlimited lights and any scene you could need, but it uses a lot fewer nodes.

For my last earth project, I ended up just plugging the image (along with my specular setup) into the specular input. Setting the image to screen or additive, I could merely link my original specular shader nodes into the background colour, and send the result straight to the specular shader input. This has advantages over using luminosity, as the colours of the city lights will now correctly show through, as opposed to merely illuminating the colours from the diffuse shading. Using it along with your diffuse nodes would also work, so long as the "city lights at night" image is added to the end (er, right hand side) of the shader tree.

The gradient uses black keys over a white background, so the image opacity input can be controlled using the gradient alpha, leaving the gradient colour free for use in the diffuse setup (greatly simplifying the diffuse nodes!). Do note, however, that this doesn't overlap the dusk areas much; the city lights will of course be at 50% when the earth is 50% lit by the sun (or whatever other lights you have in the scene). Using separate gradients (still easily using the same diffuse node) would give greater control over the dusk area, and let you "turn on" your city lights before the earth is completely dark.

Yeah, it's not all that realistic. But it's cool, and it's how everyone wants to see their earth. :D Just think of it as an outer space ND filter... films are always unrealistically darkening skies by using gradient filters, why not unrealistically darken the bright side of the earth, so both sun lit and city lights are visible? I'm sure if we were filming in outer space much, someone would try it. :thumbsup:

Hmmm, maybe it's not that unrealistic...


  • Earth-Texture.jpg
    50.1 KB · Views: 526
  • Earth.jpg
    64.6 KB · Views: 538
Top Bottom