Sign in to follow this  
LuisFelizTirado

FSX Scenery Library - which format is it?

Recommended Posts

Hi there,I was wondering in which kind of database format FSX manages its scenery library internally. I would be inclined to think that they use some very simple database solution - not sure if this would be SQL based or notMy idea is that I could hook into whatever database API they use and maybe make the scenery more dynamic. I'm kind of bored with the fact that every BGL has to be known and located before the flight starts. I want the world to be living, online, dynamic.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,I don't think the internal database format is really known, so I guess it is very hard to hook up to that. Besides that I guess it could also be a FS specific thing, so not SQL or something like that.You could use the SimConnect API of course to insert certain objects during runtime (dynamically). But that solution works best for AI like things, not that well for static objects.

Share this post


Link to post
Share on other sites

I am thinking more of dynamic landclass, elevation mesh, photoscenery that kind of stuff..

Share this post


Link to post
Share on other sites

I don't think that is possible at all. The data is stored in the BGL in a few to be able to read and process it as fast as possible (for best performance). I don't think you can hook in later on that process.But maybe you can surprise everybody and find such a way :D.

Share this post


Link to post
Share on other sites

What I'm thinking about is the "master library" of AGLs and BGLs and other scenery files that FSX maintains.The main problem (as I see it) is that this library is compiled once, then used "as is" without change -- unless during FSX startup a file or scenery folder on disk is detected as modified and the scanning process is repeated. Also going to the scenery library and confirming the dialog triggers a rescan.If they use some kind of standard APIs to a database interface, it should be possible to provide some kind of "dynamic database" of scenery to the simulator. And then it gets interesting because you can then feed new stuff in from the Internet as you fly.I really don't want to wait for Microsoft to create open APIs here. Because that means waiting for FSXI and FXII or ad infinitum.

Share this post


Link to post
Share on other sites

This all sounds very interesting, Christian. But, I fear that I do not exactly understand what you mean by dynamic scenery.Would you satisfy our curiosity with some examples and more detail?Best regards.Luis

Share this post


Link to post
Share on other sites

You take off somewhere with good terrain coverage. Then you head into some direction you haven't been before. Some daemon program running in the background searches an online database and downloads for you:BGL files containing 3D meshesAGN files containing autogen definitionsmore files containing airports, roads, etc...and of course: photorealistic terrain tiles !!!As you fly, the scenery library of FSX gets updated As you enter the territory, FSX starts displaying the new objects. As if all of this had always been on your hard drive.That's the vision. And it requires hacking the scenery library. Kind of. ;-)Dynamic in the sense of: "can be changed during flight"and: "can be updated through online connection"The trick would be to enter everything in the scenery library before you get there, so FSX has a chance to load all this when it needs to.

Share this post


Link to post
Share on other sites

Hi cbuchner1,although it sounds interesting, at least as a kind of online service, where you don't have to store everything on the harddisk, it seems a little bit difficult.I think, there is no ordinary database used. At least FSX do not come with ODBC drivers, right. And no db engine is started before FSX.I don't think, it is needed for your goal, to change or hack the library files itself. Rather have a look at this file in the parent folder of the /scenery folder, which gets updated at startup ("rebuild scenery database") , when you change the data (the library Bgls) in the scenery folder.I could imagine (pure speculation!), that this cache file contains basic information, what data to expect in the scenery-folder (100 points of road-vector-data for an area around coordinates x,y etc.).I think, these (summary) files are loaded during startup and stay there in memory.You might create dummy files, which describe data, which is not actually in the scenery subfolder, but must be downloaded.But then you must deal with the startup task, which scans the disk and rebuilds these cache files during startup. And which tries to open the files in the scenery folder.You might have another look, if the old scenery caching mechanism still works, where you didn't copy all disks at installation time, but rather copy the data during the startup, store it in a cache folder and delete the caches, when stopping the sim. Regards,Edgar

Share this post


Link to post
Share on other sites

>I don't think, it is needed for your goal, to change or hack>the library files itself. Rather have a look at this file in>the parent folder of the /scenery folder, which gets updated>at startup ("rebuild scenery database") , when you change the>data (the library Bgls) in the scenery folder.>FSX is different from FS9 in that the scenery.dat is no longer used. The information is held in:C:Documents and SettingsAll UsersApplication DataMicrosoftFSXSceneryIndexescontaining an index plus a .dat file for each area.George

Share this post


Link to post
Share on other sites

It all sounds fascinating, Christian, and quite ambitious.Perhaps the most difficult part is the autogen. Have you taken a look at the various autogen definitions? Just open the following files in the Autogen Configuration Editor: 1. AutogenDescriptions.xml -- this file contains, among other things, the definitions of all vegetation types 2. Extrusions.xml -- the definitions for polyline buildings 3. RoofDescriptions.xml -- the definitions for normal autogen buildingsThe format for the annotation files was described in this forum some time ago - you can just do a search to find everything. And while it may have changed a bit for FS X, it should still be mostly the same.The problem is placing it on the custom ground. If you use a publicly available, land use source, then you will run into many inaccuracies, as well as autogen that does not fit with the custom textures.So you may have to try putting together some recognition procedure where the different parts of the ground are categorized somehow.As for roads, I assume you mean traffic. And that should be possible, at least for the U.S. using various sources. And traffic will display on top of custom ground.Best regards.Luis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this