Orbital rendering for Flightgear

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
Since I've been doing GLSL shader effects for a while, I thought it'd be nice to have some alternative engine to render orbital views in Flightgear. Quite a while ago I wrote some short proof of concept putting a simple textured sphere into the scene and positioning it using ray optics. Now I decided to give it a push, managed to get a knowledgeable 3d-modeler aboard for texturing and improved the OpenGL works. With about 8 hours of coding time invested, I'm quite happy with the outcome. It's still rough around the edges, but it shows potential.

Textures are from NASA's Visible Earth taken at highest resolution. If the graphics card comes with a good memory, then the performance is excellent, I run at 60 fps vsync.

The atmosphere glow is rendered by an OpenGL shader doing the physics of Rayleigh, Mie and Diffuse scattering. Aerosol density in the atmosphere can be varied. Hazing of the planet is done by another shader effect taking diffuse haze in the troposphere into account. The ground light gets rotated to a more reddish hue in the terminator region to match what the atmosphere shader is doing.

An overall impression from low orbit (Nevada, USA):

earthview_new04.jpg


Cloud shadows at noon (Colorado, USA):

earthview_new06.jpg


Morning scene with ocean reflection and cloud shadows on the sea (Florida, USA):

earthview_new08.jpg


The cloud sphere can be rotated around, effectively changing weather in a location (Iran):

earthview_new10.jpg


earthview_new11.jpg


earthview_new12.jpg


And the atmosphere shader does a nice job at low light... dawn with a subtle turn into red on the ground:

earthview_new13.jpg


And the last afterglow of the atmosphere from the nightside:

earthview_new14.jpg


The code is of course GPL licensed - if anyone is interested, drop me a line and I'll be happy to hand it over.
 

paddy2

Addon Developer
Addon Developer
Joined
Jul 21, 2012
Messages
384
Reaction score
1
Points
18
Location
Kent, UK
Not a bad looking place! wouldn't mind living there :rofl:
 

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
And flight tests with the Vostok spacecraft (to my shame, a launch abort, I got into an unstable situation after stage-2 separation, so I ended up doing a ballistic hop over the US...)

vostok-01.jpg


vostok-02.jpg
 
Top