Post by Tom/CalClassic on Oct 16, 2008 14:38:19 GMT -5
Here's how we create the library bgl files from GMAX.
1. File/Export/Scenery MDL file. If you don't have this choice you need to download and install the FS2004 GMAX SDK from MS. Yes, it's still available.
support.microsoft.com/kb/555857
2. The result of this export will be an XML and an MDL file. The XML file will contain the compiler info, and the MDL file contains the GMAX shape/texture info.
3. Compile the files using BGLComp. The way we do this is described below.
4. Move the resulting BGL file into the scenery subfolder of your scenery's folder.
We create a single library file that contains all of our GMAX objects for that scenery. Then we can place them using GUI programs like EZ-Scenery or Instant Scenery. We place complex files (i.e. with beacons attached) using SceneGenX.
Here's how to create the library. You can also use a program like Library Creator for this, but it's pretty simple to do yourself:
1. When exporting, place all the XML and MDL files into their own folder.
2. Make a copy of one of the XML files and rename it Yourscenery_Library.xml. Replace Yourscenery with the name of your scenery.
3. Open this XML file in Wordpad or in an XML editor. In Wordpad you will see something like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<!-- Sample object placement. Remove comment markers to place object east of 34R at Sea Tac. -->
<!-- <SceneryObject lat="47 25.84" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="11E8D97743DC2769306F98B1ADF3A7C3" scale="1.0" />
</SceneryObject> -->
<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData name="11E8D97743DC2769306F98B1ADF3A7C3" sourceFile="LGB.mdl" />
</FSData>
This file is pretty well explained - after the header, the first part is to place it at Sea Tac (if desired), and you only need to change the lat and long to move it to any desired location. If you remove the <!-- and the --> from the ends of the Scenery Object section, the object will show up once this file is compiled. But for a library object, you do NOT want the object placed anywhere, so we leave this section alone.
The second part is the Model Data section. This is the part that creates an object library. In this case it only holds one object - a terminal at LGB. But we have other objects to place into this library (a parking area, for example). So to add more objects to our object library we copy and paste more Model Data lines from the other XML files. We already have one, so let's add the line for the parking area:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<!-- Sample object placement. Remove comment markers to place object east of 34R at Sea Tac. -->
<!-- <SceneryObject lat="47 25.84" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="11E8D97743DC2769306F98B1ADF3A7C3" scale="1.0" />
</SceneryObject> -->
<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData name="11E8D97743DC2769306F98B1ADF3A7C3" sourceFile="LGB.mdl" />
<ModelData name="1FC1FC794320FE693B8E839FA7E1CB49" sourceFile="lgbparking.mdl" />
</FSData>
Now we have two objects included in our scenery library. Continue adding Model Data lines until they are all listed.
Now we'll compile them into an Object Library. You can copy BGLComp.exe into this folder and drag our new library XML file over the top of it to compile it. Then move the resulting BGL file to your scenery subfolder. But if you are going to create more than one or two sceneries, there's a much easier way to do this.
Here's how we set this up:
The easiest way I know to compile files with BGLComp is to add it to the Send To menu. No copying, no finding BGLComp, just instant compilation!
To put it on the Send To menu:
1. Right click the BGLComp.exe file and choose Create Shortcut.
2. Name it BGLComp.
3. Right click the Start Menu button and choose Explore.
4. Press the Folders button to get the list of folders on the left if not already there.
5. Just above the Start Menu folder will be the Send To folder. If not there see below.
6. Move the BGLComp shortcut into the Send To folder.
Then right click on the XML file (can be anywhere on your computer) and choose Send To/BglComp. The BGL file will be created in the same folder. If the BGL file does not appear, you need to use one of the other methods to run it so you can see the error message.
I use this technique for all DOS programs (like CabDir, etc.).
If you don't see a Send To folder (which is set as hidden), you need to change your Windows Explorer settings.
To see hidden folders:
1. Right click on the Start Button and choose Explore.
2. Choose the Tools/Folder Options/View tab
3. Scroll down to Hidden Files and Folders and click the Show Hidden Files and Folders radio button.
4. Click OK.
Hope this helps,
1. File/Export/Scenery MDL file. If you don't have this choice you need to download and install the FS2004 GMAX SDK from MS. Yes, it's still available.
support.microsoft.com/kb/555857
2. The result of this export will be an XML and an MDL file. The XML file will contain the compiler info, and the MDL file contains the GMAX shape/texture info.
3. Compile the files using BGLComp. The way we do this is described below.
4. Move the resulting BGL file into the scenery subfolder of your scenery's folder.
We create a single library file that contains all of our GMAX objects for that scenery. Then we can place them using GUI programs like EZ-Scenery or Instant Scenery. We place complex files (i.e. with beacons attached) using SceneGenX.
Here's how to create the library. You can also use a program like Library Creator for this, but it's pretty simple to do yourself:
1. When exporting, place all the XML and MDL files into their own folder.
2. Make a copy of one of the XML files and rename it Yourscenery_Library.xml. Replace Yourscenery with the name of your scenery.
3. Open this XML file in Wordpad or in an XML editor. In Wordpad you will see something like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<!-- Sample object placement. Remove comment markers to place object east of 34R at Sea Tac. -->
<!-- <SceneryObject lat="47 25.84" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="11E8D97743DC2769306F98B1ADF3A7C3" scale="1.0" />
</SceneryObject> -->
<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData name="11E8D97743DC2769306F98B1ADF3A7C3" sourceFile="LGB.mdl" />
</FSData>
This file is pretty well explained - after the header, the first part is to place it at Sea Tac (if desired), and you only need to change the lat and long to move it to any desired location. If you remove the <!-- and the --> from the ends of the Scenery Object section, the object will show up once this file is compiled. But for a library object, you do NOT want the object placed anywhere, so we leave this section alone.
The second part is the Model Data section. This is the part that creates an object library. In this case it only holds one object - a terminal at LGB. But we have other objects to place into this library (a parking area, for example). So to add more objects to our object library we copy and paste more Model Data lines from the other XML files. We already have one, so let's add the line for the parking area:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<!-- Sample object placement. Remove comment markers to place object east of 34R at Sea Tac. -->
<!-- <SceneryObject lat="47 25.84" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="11E8D97743DC2769306F98B1ADF3A7C3" scale="1.0" />
</SceneryObject> -->
<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData name="11E8D97743DC2769306F98B1ADF3A7C3" sourceFile="LGB.mdl" />
<ModelData name="1FC1FC794320FE693B8E839FA7E1CB49" sourceFile="lgbparking.mdl" />
</FSData>
Now we have two objects included in our scenery library. Continue adding Model Data lines until they are all listed.
Now we'll compile them into an Object Library. You can copy BGLComp.exe into this folder and drag our new library XML file over the top of it to compile it. Then move the resulting BGL file to your scenery subfolder. But if you are going to create more than one or two sceneries, there's a much easier way to do this.
Here's how we set this up:
The easiest way I know to compile files with BGLComp is to add it to the Send To menu. No copying, no finding BGLComp, just instant compilation!
To put it on the Send To menu:
1. Right click the BGLComp.exe file and choose Create Shortcut.
2. Name it BGLComp.
3. Right click the Start Menu button and choose Explore.
4. Press the Folders button to get the list of folders on the left if not already there.
5. Just above the Start Menu folder will be the Send To folder. If not there see below.
6. Move the BGLComp shortcut into the Send To folder.
Then right click on the XML file (can be anywhere on your computer) and choose Send To/BglComp. The BGL file will be created in the same folder. If the BGL file does not appear, you need to use one of the other methods to run it so you can see the error message.
I use this technique for all DOS programs (like CabDir, etc.).
If you don't see a Send To folder (which is set as hidden), you need to change your Windows Explorer settings.
To see hidden folders:
1. Right click on the Start Button and choose Explore.
2. Choose the Tools/Folder Options/View tab
3. Scroll down to Hidden Files and Folders and click the Show Hidden Files and Folders radio button.
4. Click OK.
Hope this helps,