Earth Night Lights and terminator

Post requests, images, descriptions and reports about work in progress here.
Topic author
FordPrefect
Posts: 4
Joined: 24.08.2008
With us: 16 years 3 months

Earth Night Lights and terminator

Post #1by FordPrefect » 26.08.2008, 21:29

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!

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #2by ElChristou » 26.08.2008, 22:17

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?
Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Earth Night Lights and terminator

Post #3by selden » 26.08.2008, 22:32

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. :(
Selden

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #4by ElChristou » 26.08.2008, 22:39

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...
Image

Topic author
FordPrefect
Posts: 4
Joined: 24.08.2008
With us: 16 years 3 months

Re: Earth Night Lights and terminator

Post #5by FordPrefect » 26.08.2008, 22:58

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!

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Re: Earth Night Lights and terminator

Post #6by chris » 27.08.2008, 01:27

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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #7by ElChristou » 27.08.2008, 07:21

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!)
Image

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #8by ElChristou » 27.08.2008, 07:27

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...)
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Re: Earth Night Lights and terminator

Post #9by chris » 27.08.2008, 07:38

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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #10by ElChristou » 27.08.2008, 08:19

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?
Image

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Re: Earth Night Lights and terminator

Post #11by bh » 27.08.2008, 08:47

Hey Ford... I wouldn't mind a go with your Earth texture... looking neat.
regards...bh.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Re: Earth Night Lights and terminator

Post #12by chris » 27.08.2008, 09:15

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

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Earth Night Lights and terminator

Post #13by t00fri » 27.08.2008, 10:11

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
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Earth Night Lights and terminator

Post #14by t00fri » 27.08.2008, 10:35

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
Last edited by t00fri on 27.08.2008, 10:47, edited 1 time in total.
Image

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Re: Earth Night Lights and terminator

Post #15by chris » 27.08.2008, 10:57

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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #16by ElChristou » 27.08.2008, 11:26

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...)
Image

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Earth Night Lights and terminator

Post #17by selden » 27.08.2008, 12:23

(CloudNormalMap is already recognized in v1.5.1)
Selden

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Re: Earth Night Lights and terminator

Post #18by ElChristou » 27.08.2008, 12:34

selden wrote:(CloudNormalMap is already recognized in v1.5.1)

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

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Earth Night Lights and terminator

Post #19by t00fri » 27.08.2008, 13:00

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
Image

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Earth Night Lights and terminator

Post #20by BobHegwood » 28.08.2008, 15:44

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:
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN


Return to “Add-on development”