Earth from orbit¶
Earthview shows the Earth from high altitude, but out of the box with only 2048 pixels per tile, roughly 5 km per pixel. NASA images turn that into 16,384 pixels.




Left: out of the box. Right: with NASA images.
Space and time¶
You need about 6 GB for the sources and 3 GB for the result, plus plenty of RAM. Expect several minutes per tile.
Download the images¶
mkdir -p "$FG_BASIS"/Quellen/{blue_marble_ohne_relief,black_marble_2016,blue_marble_clouds}
cd "$FG_BASIS/Quellen"
N=https://eoimages.gsfc.nasa.gov/images/imagerecords
for k in A1 B1 C1 D1 A2 B2 C2 D2; do
curl -L -o blue_marble_ohne_relief/bm.$k.jpg "$N/74000/74167/world.200410.3x21600x21600.$k.jpg"
curl -L -o black_marble_2016/BlackMarble_2016_$k.jpg "$N/144000/144898/BlackMarble_2016_$k.jpg"
done
curl -L -o blue_marble_clouds/cloud.E.png "$N/57000/57747/cloud.E.2001210.21600x21600.png"
curl -L -o blue_marble_clouds/cloud.W.png "$N/57000/57747/cloud.W.2001210.21600x21600.png"
Build and install¶
cd "$FG_BASIS/werkzeuge"
python3 nasa_erde.py
python3 nasa_erde.py --einbauen
The overlay must be set up first.
Turn on Earthview¶
Earthview runs through Nasal, so it also works from outside:
from fg_steuerung import Fg
fg = Fg()
fg.nasal("earthview.start();")
fg.set("/earthview/cloudcover-bias", 0.6) # smaller: fewer clouds
fg.set("/earthview/cloud-shadow-flag", 0)
earthview.stop(); turns it off again. Earthview only suits high altitudes; I use it from 90,000 ft.
Pitfalls¶
City lights in the alpha channel: The shader computes
night_light = 1 - alpha. Black Marble also shows land faintly, so only values from 45 count as light.Mirrored Earth: DDS is stored the other way round from PNG. Unmirrored, the Arctic sat on the equator.
Furrows in the sea: The NASA version with bathymetry shows the sea floor. The script therefore uses the version without relief.
ImageMagick limit: 16,384 pixels fail in one piece. DXT5 compresses 4 × 4 pixel blocks independently, though, so the script converts strips one at a time and joins them.
Grid at strong zoom: The city lights then show a fine pattern. Those are the pixels of the NASA image, not a shader error.