Earthview: Difference between revisions

Jump to navigation Jump to search
721 bytes removed ,  21 March 2016
no edit summary
No edit summary
Line 1: Line 1:
{{See also|Flying on other planets}}
{{See also|Flying on other planets}}
Earthview is an orbital rendering engine for FlightGear designed to get credible visuals when using spacecraft such as [[Vostok-1]]. It is based on projecting a simple textured sphere representing Earth into the scene using ray optics. Since there is only a single object in the field of view, performance is generally very good provided that there is enough texture memory available.
 
The default FlightGear terrain rendering strategy is designed for visuals from aircraft cruise altitude. While it is [http://www.flightgear.org/tours/pushing-the-boundaries-the-x-15-story/ possible] to use it for altitudes up to some 100 km, the performance impact becomes increasingly prohibitive and the visuals are not overly compelling. In particular for orbiting spacecraft such as [[Vostok-1]] or the [[Space Shuttle]] neither rendering nor loading the standard terrain mesh is fast enough.
 
Earthview is an alternative orbital rendering engine for FlightGear designed to get credible visuals in these situations. It is based on projecting a simple textured sphere representing Earth into the scene using ray optics. The quality of the terrain visuals then largely depend on the texture size used. Since there is then only a single object in the field of view, performance is generally very good provided that there is enough texture memory available.


{{Spaceflight}}
{{Spaceflight}}
=== Orbital Rendering: Earthview ===
=== Overview ===
 
Earthview is started from the menu as View -> Earthview Orbital Rendering. This brings up the configuration dialog.


[[File:Earthview.jpg|thumb|Earthview configuration dialog]]


By March 16th, 2012, Thorstem Renk managed to implement a scheme for orbital terrain rendering which he had cooked up a while ago.
{{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/28991398/
  | title  = <nowiki>[Flightgear-devel] Earthview - Orbital terrain rendering in FG, 2012</nowiki>
  }}


It was really low-tech and lived within the limitations of the current engine - just a textured sphere of 58 km diameter in the scene which was constantly repositioned using simple ray-optics to give the right impression and had a dedicated shader to never fog it and work around the high altitude light problem. The results using Celestia Level 3 texturing were quite compelling.
The options checkboxes allow to select
{{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/28991398/
  | title  = <nowiki>[Flightgear-devel] Earthview - Orbital terrain rendering in FG - T Renk, 2012</nowiki>


  }}
* whether a cloud layer should be rendered above the planet
* whether the cloud layer information should be used to render cloud shadows onto the terrain
* whether Earthview should take control of the atmosphere visuals and adjust them based on altitude
* whether textures should be procedurally enhanced with overlay textures to provide better apparent texture resolution


It took 7 hours to get it to this point, less than 100 lines of Nasal, some cut and paste with the shaders - most of the time was spent stitching and converting textures. It was really dumb - one could go to even higher resolution texturing by investing some smartness and introducing texture management (currently Earth is effectively covered by 4096x8192, the cloud layer adds the same amount).
'Start' run Earthview, 'Stop' ends the computations and removes the 3d model. Generally, using Earthview below an altitude of ~30  km / 100.000 ft is not recommended and will almost certainly not give the desired visuals.
{{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/28991398/
  | title  = <nowiki>[Flightgear-devel] Earthview - Orbital terrain rendering in FG - T Renk, 201w</nowiki>
}}


Sliders further down can be used to adjust details. For instance, if no cloud shadows are rendered, it is possible to rotate the cloud sphere around Earth and give different places different weather (otherwise, the cloud pattern will always be the same, i.e. if a place is obscured by clouds initially, it will always be). Using Rayleigh, Mie and Density, atmosphere visuals (if Atmospheric light scattering] (ALS) is on) can be adjusted. Visibility dials the amount of fogging seen on the planet.


Earthview runs without ALS, but does not provide any credible visuals of the Atmosphere.


If atmosphere visuals are rendered, Earthview interacts with the weather system in that the visibility used by Earthview and by the weather system will be the same. In the case of [[A local weather system | Advanced Weather]] (AW) this is an issue because both systems try to adjust atmosphere visuals. For this reason, AW needs to be ended before Earthview is started. There is no general option to do this automatically, but an automatic transition from default FG rendering and weather to Earthview is easily coded spacecraft side and implemented for the Space Shuttle.


Textures are taken from the NASA Visible Earth project - at the highest resolution level, Earth can be rendered at 32768x65536 pixel (about 500 m per pixel) and clouds with half of that. Currently there is a much lower texture resolution distributed via GIT; a mode to make the GB-sized hires textures has yet to be determined.
All textures are taken from the [http://visibleearth.nasa.gov/ NASA Visible Earth project] - at the highest resolution level, Earth can be rendered at 32768x65536 pixel (about 500 x 500 m per pixel) and clouds with half of that. Currently there is a much lower texture resolution distributed in FGData as the highest resolution set has eight textures sheets of 172 MB each which would double the current repository size. It is however easily possible to obtain the textures from the NASA website and apply them.


Combined with the [[atmospheric light scattering]] (ALS) shader to render the atmosphere, visuals are generally rather compelling.
At highest texture resolution, visuals are generally very compelling:


[[File:Earthview for low Earth orbit.jpg|450px|Low orbit]] [[File:Earthview hig altitude.jpg|450px|High orbit]]
[[File:Earthview for low Earth orbit.jpg|450px|Low orbit]] [[File:Earthview hig altitude.jpg|450px|High orbit]]
Line 38: Line 38:
[[File:Earthview cloud shadows.jpg|450px|Cloud shadows in Earthview]] [[File:Earthview specular water reflections.jpg|450px|Specular water reflections and cloud shadows in Earthview]]
[[File:Earthview cloud shadows.jpg|450px|Cloud shadows in Earthview]] [[File:Earthview specular water reflections.jpg|450px|Specular water reflections and cloud shadows in Earthview]]


A long standing problem in FlightGear's atmosphere definition has now been addressed and JSBSim spacecraft should now be able to reach any orbital altitude within their capabilities (previously flight was restricted to be below 150 km altitude).
Earthview can also render Aurora Borealis seen from space.
 
Thorsten remarked that a good way to see the blue planet from high up was to start FG using the ufo at a high altitude (around 10 million ft is quite good with the texture resolution provided), open the GUI from the View menu, push start, wait for the textures to load and admire the view.
{{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/32262904/
  | title  = <nowiki>[Flightgear-devel] Mailing List, Apr 24 2014</nowiki>
  }}
 
 
Earthview responds to the weather visibility setting and typically 80-140 km visibility work best (it won't affect any scenery loading because we're too far from the planet). Also, while rendering in ALS, manually tweaking Rayleigh and Mie constants gives a nice atmosphere effect. NASA provides textures in /much/ higher resolution - in the highest resolution texture set, Thorsten had the planet covered in 32768x16384 and the cloud layer in half of that. For such large textures, loading time is an issue (Earthview isn't excatly *cough* elegant) and pre-mipmapped compressed DDS is pretty much the only sane option - then that's 8 texture chunks at 176 MB each. It would be nice to make higher resolution versions available for download, but obviously that's quite a bandwidth hog - if there's sufficient interest and someone knows a server... the textures are there. Provided you have the texture memory, performance should actually be pretty high - there's just two textured spheres in the scene, and even on an old computer, some get a solid 60 fps.
{{cite web
  | url    = http://sourceforge.net/p/flightgear/mailman/message/32262904/
  | title  = <nowiki>[Flightgear-devel] Orbital rendering - T. Renk</nowiki>
 
  }}


== Requirements ==
== Requirements ==
1,360

edits

Navigation menu