Page 1 of 2

Earth Night Lights and terminator

Posted: 26.08.2008, 21:29
by FordPrefect
Hello everyone!

New user here. I installed Celestia (latest beta snapshot) for the first time 2 weeks ago and I really like it! I am a long time "Orbiter" user and add-on creator and I just don't know why I didn't give Celestia a shot sooner... Maybe the reason is my relatively low spec desktop I have. It's a 900 MHz Pentium III, 1 GB SDRAM, 128MB FX5200 graphic card - system :| and two years ago I still had a 32 MB graphics card! Back then I couldn't run Celestia decently.

So many features in Celestia! I love the Ring shadows being casted on Saturn, planetary shadows and eclipses, the atmospheric rendering and the light scattering / reflection in general. Especially the moon when looking from the direction of the sun looks amazingly realistic, with the main backscattering happening towards the sun (zero phase glare). Most impressive! :D

Just a quick question. I created my own new Earth texture (4096 px wide, my FX5200 can't handle anything larger), hoping I could achieve very "realistically" looking colors on the landmasses. I have to thank a lot Don Edwards for providing me his oceanic surface map, which is used in this texture. (BTW, Don, if you happen to read this, my large Earth texture project is not forgotten, it is just my system cannot reasonably handle the big image files in PS. :roll: I should get a new rig this winter though! :D )

Here's a few screenies (straight from Celestia):

-Recreating the famous Apollo 17 Blue Marble shot: http://img.photobucket.com/albums/v316/ ... thTex1.jpg
-South America: http://img.photobucket.com/albums/v316/ ... thTex2.jpg
-Far East and Australia: http://img.photobucket.com/albums/v316/ ... thTex3.jpg

Also I created a new set of night texture. While testing the results, I discovered the ligths being shown pretty far "into" the daylit portion from the terminator. See here: http://img.photobucket.com/albums/v316/ ... lights.jpg
If I wanted to narrow down the width of the band in which the surface lights are "turned on", would I need to make changes in the ssc file, or is there any other way to do so? Thanks for any help.

Cheers to you all!

Re: Earth Night Lights and terminator

Posted: 26.08.2008, 22:17
by ElChristou
FordPrefect wrote:...If I wanted to narrow down the width of the band in which the surface lights are "turned on", would I need to make changes in the ssc file, or is there any other way to do so? Thanks for any help.

Welcome!
You want the night light to not appear so quickly, is that right?

Re: Earth Night Lights and terminator

Posted: 26.08.2008, 22:32
by selden
Unfortunately, the algorithm which displays the night lights is buried in the guts of Celestia. Chris Laurel would have to comment on how they might be dimmed in the vicinity of the terminator.

Have you tried making the illuminated regions darker? I dunno if that might make enough of a difference to be acceptable.

Celestia v1.6 (as built from svn source code) can draw the terminator if you use the right-mouse-button popup menu: select Reference Vectors/ Show Terminator. Seeing that line makes it quite obvious that Celestia is drawing the Earth's night-lights much too far into the sunlit regions. :(

Re: Earth Night Lights and terminator

Posted: 26.08.2008, 22:39
by ElChristou
selden wrote:...Seeing that line makes it quite obvious that Celestia is drawing the Earth's night-lights much too far into the sunlit regions. :(

Yep, it's also my feeling...

Re: Earth Night Lights and terminator

Posted: 26.08.2008, 22:58
by FordPrefect
Hello ElChristou! Yes, that's exactly what I meant. Thank you for the welcome :D By the way, I am the one who contacted you for some 3d modeling tips, when I saw your outstanding Apollo meshes. I've made some good progress there, I am really starting to understand how Max is working. Unfortunately my time spending in modeling is very limited, so I didn't come too far yet. Here's the current state of my Lunar Module ascent stage: http://img.photobucket.com/albums/v316/ ... ent_19.jpg


Selden, thanks for your insight! I will try if a darkened night light texture is going to make a difference on the issue. As you stated/suggested, having the terminator displayed, the offset is very obvious:
http://img.photobucket.com/albums/v316/ ... offset.jpg

Cheers!

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 01:27
by chris
Do you prefer this?

nightlights.jpg


This example uses a different equation for blending the night lights texture. In Celestia 1.5.1, the brightness of the night lights is (1 - d)^4, where d is the total diffuse light. In the above image, it is max(0, min(1, 10*(0.1 - d)))

--Chris

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 07:21
by ElChristou
FordPrefect wrote:...Here's the current state of my Lunar Module ascent stage: http://img.photobucket.com/albums/v316/ ... ent_19.jpg

Seems pretty neat so far! Will you go for a higher res than mine? (I'd love it!)

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 07:27
by ElChristou
chris wrote:Do you prefer this?

Chris perso I think no lights should be visible before the terminator; even if the official release is not HDR, I suppose the terminator zone is still too prone to the global light from the light side and so the dim lights from the cities would not being this visible at naked eye... (and yes, I'm aware that no light at all would be visible at naked eye, but...)

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 07:38
by chris
ElChristou wrote:
chris wrote:Do you prefer this?

Chris perso I think no lights should be visible before the terminator; even if the official release is not HDR, I suppose the terminator zone is still too prone to the global light from the light side and so the dim lights from the cities would not being this visible at naked eye... (and yes, I'm aware that no light at all would be visible at naked eye, but...)

Completely eliminating lights on the daylit side of the terminator just ends up looking weird. An abrupt transition from no lights to full lights right at the terminator looks unnaturally sharp. The other alternative is a more gradual transition from no lights right at the terminator to full lights at some region on the night side of the terminator. In this case, there's a completely black band dividing the daylight hemisphere and night lights hemisphere--it ugly!

--Chris

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 08:19
by ElChristou
chris wrote:Completely eliminating lights on the daylit side of the terminator just ends up looking weird. An abrupt transition from no lights to full lights right at the terminator looks unnaturally sharp. The other alternative is a more gradual transition from no lights right at the terminator to full lights at some region on the night side of the terminator. In this case, there's a completely black band dividing the daylight hemisphere and night lights hemisphere--it ugly!

Ok, now I will probably say something stupid, but what if you divide the night side in 3 zones of 60°, first 60, fading in to full night lights, second 60, full night lights and last 60, full night lights to fade out. The result may show full lights in the center of the dark side with gradient going to terminator on each side... Ugly too?

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 08:47
by bh
Hey Ford... I wouldn't mind a go with your Earth texture... looking neat.

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 09:15
by chris
ElChristou wrote:
chris wrote:Completely eliminating lights on the daylit side of the terminator just ends up looking weird. An abrupt transition from no lights to full lights right at the terminator looks unnaturally sharp. The other alternative is a more gradual transition from no lights right at the terminator to full lights at some region on the night side of the terminator. In this case, there's a completely black band dividing the daylight hemisphere and night lights hemisphere--it ugly!

Ok, now I will probably say something stupid, but what if you divide the night side in 3 zones of 60°, first 60, fading in to full night lights, second 60, full night lights and last 60, full night lights to fade out. The result may show full lights in the center of the dark side with gradient going to terminator on each side... Ugly too?

Yeah . . . It doesn't look good because there are large areas of the Earth that are almost completely black.

--Chris

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 10:11
by t00fri
I think that a standardized setting of monitor brightness and contrast is required before this issue can be discussed meaningfully.

The respective settings of FordPerfect or others could differ significantly.

Normally one distinguishes two distinct darkness definitions: the usual one corresponding to the sun being -6 degrees below horizon, while astronomical darkness is -18 degrees.
Even for the -6 degrees definition, lights could well be visible somewhat earlier. -18 degrees is really "pitch dark" ;-)

I forgot how Chris defined his terminator line in Celestia.

Fridger

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 10:35
by t00fri
Let me also refer to the EXTENSIVE discussion about nightlights we were having over at CelestialMatters

http://forum.celestialmatters.org/viewt ... c&start=30

Notably, see my test images at the eand of the thread.

Although the respective resolutions were MUCH higher (32k x 16k), I used the latest official radiation calibrated nightlight b/w data and colored them by computer (GIMP) from astronaut photos of cities at night.

We did not feel there were real problems with nightlights.

Image

Fridger

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 10:57
by chris
t00fri wrote:I think that a standardized setting of monitor brightness and contrast is required before this issue can be discussed meaningfully.

The respective settings of FordPerfect or others could differ significantly.

Normally one distinguishes two distinct darkness definitions: the usual one corresponding to the sun being -6 degrees below horizon, while astronomical darkness is -18 degrees.
Even for the -6 degrees definition, lights could well be visible somewhat earlier. -18 degrees is really "pitch dark" ;-)

The appearance of night lights isn't realistic now. The illumination from reflected sunlight is so great that it would probably overwhelm artificial light completely. Should portions of both the night and day hemispheres be visible to an astronaut orbiting thousands of kilometers from Earth, artificial lighting on the shadowed side would appear as a dim glow at best. Something like this: http://earthobservatory.nasa.gov/Newsro ... th_lrg.jpg

Obviously, this is a lot less interesting to look at, so I think it's best to continue to exercise 'artistic license' where night lights are concerned :) We're taking more or less the same approach for stars, which remain visible even in the presence of a bright light source. When we finish implementing the HDR rendering path, we'll be more rigorous; DW has already made progress here.

I forgot how Chris defined his terminator line in Celestia.

In Celestia, it is defined as the set of points on the planet's surface at which the center of the Sun is exactly on the horizon. Other definitions that are based on the Sun being a certain angular distance below the horizon are straightforward to compute on a sphere, but much more challenging on a triaxial ellipsoid.

--Chris

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 11:26
by ElChristou
chris wrote:...Something like this: http://earthobservatory.nasa.gov/Newsro ... th_lrg.jpg
There is some night lights visible on this shot??

(Off topic, looking at this shot, it came to my mind that apart from cloud shadows, we perhaps need some kind of normal map for clouds...)

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 12:23
by selden
(CloudNormalMap is already recognized in v1.5.1)

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 12:34
by ElChristou
selden wrote:(CloudNormalMap is already recognized in v1.5.1)

(Gasp! wasn't aware... :oops:
Someone already done such map?)

Re: Earth Night Lights and terminator

Posted: 27.08.2008, 13:00
by t00fri
chris wrote:....
The illumination from reflected sunlight is so great that it would probably overwhelm artificial light completely. Should portions of both the night and day hemispheres be visible to an astronaut orbiting thousands of kilometers from Earth, artificial lighting on the shadowed side would appear as a dim glow at best. Something like this: http://earthobservatory.nasa.gov/Newsro ... th_lrg.jpg

These statements (as well as your image illustration) only apply to observers far away from the atmosphere. The situation changes significantly, when the observer is in orbit not far from the atmospheric boundary.

See this impressive video for example:
http://eol.jsc.nasa.gov/cities/CitiesAt ... 0edit7.mpg

One still example thereof: Kairo , taken with a properly suspended NORMAL camera (see video):

Image

In such closer orbit configurations, notably, atmospheric extinction effects have to be properly taken care of. This means that a well defined angular dependence of the extinction must also be implemented. As we all know , this depends on the "optical path length" within the atmosphere which the light encounters between its source on the surface and the observer in space. Since many aspects of Celestia's atmospheres are still in their infancy, here we really need improved atmospheric code, first. (sorry for beating dead cows again ;-) )

For my part, I readjusted in my solarsys.scc the Earth's Mie parameters to mock up such effects to some (very limited) extent.

Fridger

Re: Earth Night Lights and terminator

Posted: 28.08.2008, 15:44
by BobHegwood
As I mentioned in the appropriate CM topic listed above, your Mie adjustments make the night side lights very much
more pleasing to my tastes. Very interesting discussion concerning the whole topic too. Thanks a lot for the advice here.
As usual, much appreciated by the Brain-Dead. :wink: