PDA

View Full Version : Lighting the dark side of the earth



cyphyr
10-12-2006, 06:05 AM
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.
thanks
cyphyr

Dave Jerrard
10-13-2006, 12:00 PM
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.

avkills
10-13-2006, 02:59 PM
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?

-mark

Scazzino
10-13-2006, 03:28 PM
There wouldn't be many lights visible from space if Kim Jong-il controlled the dark side of the earth... ;)

http://img.dailymail.co.uk/i/pix/2006/10/koreaREU121006_548x700.jpg

Dave Jerrard
10-13-2006, 04:04 PM
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 (http://www.newtek.com/forums/showthread.php?t=56089).


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

Maxx
10-14-2006, 08:24 AM
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 ) -
http://www.maxxwv.com/stuff/earth_nodes.jpg
[larger image (http://www.maxxwv.com/stuff/earth_nodes_lg.jpg)]
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)
http://www.maxxwv.com/stuff/earth_no_atmo.jpg

Iaian7
10-20-2006, 11:43 AM
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...

Blaine91555
11-21-2006, 10:52 PM
This site might be helpful.
http://planetpixelemporium.com/earth.html