PageableOpenFlight is a simple utility for reading in an OpenFlight file and writing out a .osg file. The .osg file will include all the transforms and external references of the original .flt file, but will include additional nodes to enable paging of the external references.
Why would you want to do this? Often, we have gigantic OpenFlight terrain databases (a "terrain database" is a 3d model representing terrain). These terrain databases are several gigabytes, and can't fit into memory on a typical PC. These files are generated by our terrain-generation tools, with the expectation that the gigantic flt models will be converted into a IG-specific paging format. (OpenFlight, in this case, is being used as an interchange format, to feed data into a conversion tool from an IG vendor.) Often we would like to use these flt files for some quick-and-dirty visualization, but we can't because the files are too large to fit into memory. By converting the flt "index" file (usually called "master.flt") into a paging format (such as .osg), we can view the terrain without loading the entire model into memory.
The utility performs the following actions:
There are a number of limitations of this utility:
This utility requires:
FltLib | |
Version | FltLib hasn't (as of this writing) made a release. The current CVS version works fine. |
OpenSceneGraph | |
Version | I'm using OSG 1.2 as of this writing. |
The source code can be downloaded from the project download page.
On UNIX-like systems, running 'make' should work. OSX should be easy to support too.
Windows users are entirely on their own. If you create Visual Studio project files for this utility, you can send them to me (use the sourceforge patch submission system) and I'll include them. I can not maintain such files, however, because I do not use Windows.
Run the utility from a command prompt, like so:
> cd /where/ever/you/store/your/openflight/database > pageableOpenFlight master.flt
The output will be written to master.flt.osg
To view the results:
> osgviewer master.flt.osg
Running this utility can take a long time. You can speed things up by moving all the terrain texture files to another directory, then running the utility, then moving the textures back. This will prevent this utility from loading all the textures in the tile files (the textures aren't used by this utility anyway, so that's OK).
This project is hosted by SourceForge: