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):
Cloud shadows at noon (Colorado, USA):
Morning scene with ocean reflection and cloud shadows on the sea (Florida, USA):
The cloud sphere can be rotated around, effectively changing weather in a location (Iran):
And the atmosphere shader does a nice job at low light... dawn with a subtle turn into red on the ground:
And the last afterglow of the atmosphere from the nightside:
The code is of course GPL licensed - if anyone is interested, drop me a line and I'll be happy to hand it over.
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):
Cloud shadows at noon (Colorado, USA):
Morning scene with ocean reflection and cloud shadows on the sea (Florida, USA):
The cloud sphere can be rotated around, effectively changing weather in a location (Iran):
And the atmosphere shader does a nice job at low light... dawn with a subtle turn into red on the ground:
And the last afterglow of the atmosphere from the nightside:
The code is of course GPL licensed - if anyone is interested, drop me a line and I'll be happy to hand it over.