Hackathon Proposal: Performance Improvement for Ortho Scenery

From FlightGear wiki
Jump to navigation Jump to search


Title: Performance Improvement for Ortho Scenery

Demonstrating out of memory issues with the open bavaria ortho scenery
Sponsors: Nia
Interested Parties: (Feel free to add yourself)
Status:
Summary: Improving the performance of ortho scenery by adding a LOD scheme and loading it in a background thread
Background: I've started the initiative of collecting openly licensed ortho sources to be used in flightgear.

For bavaria, there are high quality (80cm/px) images available under CC BY license from the Bayrische Vermessungsverwaltung. The generated (16k) scenery quickly showed its issues cause one would run out of RAM and VRAM, when running larger areas with such scenery. This can be solved by implementing a LOD scheme: only loading highres versions for near-by tiles and loading lower res versions for distant tiles. In addition, with altitude the need for highres images reduces. 4k scenery (roughly 4m/px, 1/16th the size of 16k scenery) starts looking fine at 10000-12000ft AGL on a FullHD monitor and is more than enough for airliner cruise altitude so 2k or maybe even 1k scenery would be enough for that. 4k Scenery is already enough to not cause any RAM or VRAM issues on a modern system by using about 13GB RAM and 5GB VRAM at cruise alt and a bare LOD of >200km.

The other issue that becomes aparent with large or many images is loading times. It can take several seconds to load a highres tile or in cruise a row of lowres tiles. Currently, flightgear freezes during loading. This could be solved by moving the loading into its own thread.

Details: Stuart has some ideas on how it might work with WS3.0: https://sourceforge.net/p/flightgear/mailman/message/37371092/
Required skills: C++
Learning Opportunities:
Notes: I will need help of someone familiar with the rendering and loading code.
References

Progress during the Hackathon

We've got a working ortho scenery under WS3.0. The ortho scenery uses the same LOD scheme as WS3.0 does.

This already solved the loading performance issues seen with high resolution WS2.0 ortho scenery.

How to test (latest next version required):

  • Download the scenery (31GB Download) and unpack it.
  • Add the scenery to your FG_SCENERY, or via the launcher
  • Add the command line option `--prop:/scenery/use-vpb=true --prop:/sim/rendering/photoscenery/enabled=true`. This enables WS3.0 and photoscenery.
  • Start at EDDM