View Full Version : GMAX CFS2 Object Creation Question

January 28th, 2011, 17:57
:kilroy:Hello good people,
I have some GMAX export questions that I hope one of you experts will have time to answer.
I have been attempting to fumble around with GMAX with the idea of creating some “Static” or custom infrastructure objects for CFS2.
So this is what I have done to get to the point that I am at with my questions.
I have created a object with GMAX no problem.
I have installed the required BGLCOMP_SDK pack. (For BGL/MDL Objects).
I have installed the required MakeMDL_SDK pack. (For BGL/MDL Aircraft).
I have installed the required FS2004 game pack for GMAX.
I have successfully exported the required *.xml and *.mdl files.
This is where my questions or problems start.
My understanding is that at this stage I need to take the *.xml file and drag/drop it over the BGLCOMP.exe file and it will create/spit out a useable object *.bgl.
So I do this and it does create the *.bgl.
So I place this *.bgl into my Scenery folder within CFS2.
I load up MB/CFS2 and attempt to find and place the infrastructure/object.
I find it and go to place it and I get this “Error – Can’t find the model “Object” in the library.

So at this stage I ask myself, hmmmm wth.
I opened up the *.xml file and noticed a few things here.

<?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="0.0" lon="0.0" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="19CE4B9C408FDA01F25BE584257D01EE" scale="1.0" />


<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData name="19CE4B9C408FDA01F25BE584257D01EE" sourceFile="Object.mdl" />

The LibraryObject name and the ModelData name are the same and do not match file source name. Is this something that I need to change or? I have attempted to alter these and each time I try the BGLCOMP.exe does not create a new *.bgl file.
Do I have to have the SceneryObjects lat and lon information? Or can it some how be removed or needs to be removed?
So as you can see I have a lot to learn and I hope someone will be able to walk me through this nightmare.
Thanks in advance for anyone who is brave enough to help out.


January 28th, 2011, 19:57
For CFS2 you would need to use the FS2002 SDK for GMAX. FS2004 was created long after CFS2.


January 28th, 2011, 21:09
For CFS2 you would need to use the FS2002 SDK for GMAX. FS2004 was created long after CFS2.


:salute:Thanks for responding, only I was told to use FS2004 for scenery that is not a ground polygon,I was told to use the FS2004 gamepack.
Do you know where one could get the FS2002 Game pack for GMAX?

January 28th, 2011, 21:27

check this link out...


MS pulled the page but web archive found it and it looks like the orginal download links work.

Failing that... drop me a PM and I can send it over to ya.

You definitely want the MakeMDL download... also the BGL Compiler and MDL format SDKs come in handy.

You picked the right place to ask questions for CFS2 modeling.

The gall that no one thinks anyone develops for CFS2 anymore. :icon_lol:

January 28th, 2011, 22:33

I knew there would be someone here that would help me with this.
I will download these files now. Hopefully all will go well.
I may still need a little help though.

Thanks again

January 28th, 2011, 23:21
Ok, so I downloaded all of the suggested files for the FS2002 SDK pack from the link provided. Again thank you very much!
I installed them per the instructions provided by MS. Which actually calls out to copy an existing copy of MakeMDL.exe from the tutorials section of GMAX which again, I assume was referring to a FS2002 install. Because the MakeMDL.exe was not there when I looked. Anyway so I installed the FS2002 downloaded MakeMDL.exe into the plug-in folder.
I start up GMAX and load my object and try to export. No go there is no file type listed for MDL.
I must have missed a step or three somewhere. That or I need to setup something in GMAX to direct it to use this plug-in and i'm not to sure on how to do that.
Can you say HEADACHE!

January 29th, 2011, 01:08
Hey you just happen to be starting... Rhumba has been at this longer and I have been doing this for 9 years. Takes time.... lets get ya setup right. We'll get you there.

Now looks like you are wanting to export infrastructure... ie building and or objects right?

What you should see is an option to export to BGL.

Like this....

If you are not seeing that option then it is a problem with your SDK config.

Below you see my folder setup... under my GMAX\PLUGINS folder I put the FS2002 folder....

Maybe it might be easier if I zip up my FS2002 folder and send it to ya.

January 29th, 2011, 01:48
Phew looks like we lost all that knowledge out there how to set it up. If ya want I can call ya or we can get online and get your GMAX setup. I will be home all weekend so if you have some time let me know.

January 29th, 2011, 07:17
Hi Steve.

It seems you've read a bit about object creation and placement. But much of what you are thinking about pertains to FS2004. FS2004 wasn't even a gleam in the eye of the Aces development team when CFS2 was made. A lot of FS2004 creation doesn't apply to CFS2.

CFS2 doesn't use XML placement or MDLs. CFS2 uses FS2002-style BGLs. When exported from the Gmax FS2002 gamepack, you'll be asked for a specific world placement. Plug in the latitude and longitude, and you'll get a BGL specific to that exact placement.

If you wish to reuse that object at different locations, you can just re-export to those locations, or you can make a Library Object that can be placed.

CFS2 also allows you to make destroyable Library Objects, which can then be used in missions or the GSL layer, and you can blow them up... something missing from FS2002.

First, try to get the object placed by Gmax+MakeMDL, and showing up in CFS2.

Then decide if you want to progress onto making a Library Object, and eventually a destroyable Library Object. crashaz or simonu or I can help walk you through it.


January 29th, 2011, 14:34
Ok Good People,
Looks like I have successfully created a GMAX exported infrastructure object.bgl that is viewable within CFS2.
Sorry for not responding sooner, I ran into some issues at home that required my full attention.
Car battery on the Wife's car died. When it rains it pours. It's been replaced and reinstalled.

Ok so I am now flooded with a ton of questions about how to configure GMAX to export to a BGL using the FS2002 gamepack’s folder. (FS2002 GMAX SDK's)

How does one configure this? I still have not found a way to configure GMAX to use the FS2002 SDK's gamepack directly.

I had to export using the FS2004 gamepack and then drag my BGL over the FS2002 MakeMDL.exe and then copy that bgl to my scenery folder. Some how this worked. (Mind you my object is VERY basic at this stage, a simple sphere).

I am still wondering why I have to add the Lon/Lat information to my bgl. This seems a little strange.

So just that I understand this, each new infrastructure object.bgl I create will be floating or sitting in space somewhere within CFS2 at the designated location I specify? So are all infrastructure object.bgl’s floating or sitting somewhere else with-in CFS2 as well?

Crashaz & Rhumbaflappy you guys have been very helpful so far and I wanted to say thank you.

Crashaz to answer your question - Yes If it would be possible to get a copy of your FS2002 folder that you posted the picture of that would be great. That way I can compare my files to yours and go from there. Hopefully that will help.

Rhumbaflappy - Yes I would very much like to progress onto making a Library Object, and eventually a destroyable Library Object.

Thanks again guys.

January 29th, 2011, 19:01
To use Gmax for CFS2 you should have the FS2002 Pro version, that has the needed files for exporting Fs2002 BGLs. The FS2002 Pro version sells for about $10 including S&H used on Amazon.com. Only the Pro version has the needed Gmax gamepack.

You can use FS2004 Gmax in a round-about way:

Arno Gerretsen has made a tool called ModelConverterX. It can import an FS2004 MDL file, and then export an FSX .x file from this.... oddly, this .x file should be usable by FS2002 MakeMDL, and the FS2002 MakeMDL can be found as a download.

FS2002 MakeMDL (http://www.fsdeveloper.com/forum/downloads.php?do=file&id=95)

ModelConverterX (http://www.fsdeveloper.com/forum/downloads.php?do=file&id=82)

Load the .x file into MakeMDL and you should be able to get a CFS2 ( FS2002 ) BGL. When using the FS2002 MakeMDL, you'd want to check 'Keep Files' under the Options tab, This will get you the _0.asm file needed for making a Library object from Gmax.


January 29th, 2011, 19:49
Making Progress - Looks like there is a post right here in SOH.
The - cfs2_Gmax_G_pack.zip

This Gmax pack seems to have all the files required to configure GMAX so that it export's to the required/desired BGL (FS2002) type the I need to continue.
So this is where I am.
I have created my object in Gmax. Exported the object.bgl to MakeMDl.exe making sure to check the box "Keep Files". I have now three files, Object.bgl, Object.as,, and lastly Object_0.asm.

I'm ready for the next step when you are.

January 29th, 2011, 20:33
Hi there, the attached files maybe of some use.
You can use mdl commander to capture export_filename.x files. Read the docs on how it should be inserted into the export chain.
Are you still having trouble with setting up the game pack?
You should be starting Gmax with a short cut from inside the game pack.
That way the local ini files take precidence. This way Gmax can be configured with different pluggins and scripts for working with different game platforms.

Credits and kudos to Manfred Moldenhauer for SCASM
DocMoriarty for mdl commander
Richard Ludowise for the toolkit, (at least the read me has your name on it Dick, did you make the raw2sca utility?)
Unknown Aces developer for BGLC

Also worthy of note If you want to use Makemdl to compile CFS2 aircraft/ship models
You can enable extra check boxes on the options tab by starting it with a short cut that includes the following string appended to the target line

/cfs2 /fs8- /dll /debug /fullmat /softmat /specularcanopy

If you have Makemdl installed in C:\Gmax\gamepacks\CFS2_gamepack
the target line would read

C:\gmax\gamepacks\CFS2_gamepack\plugins\makemdl.ex e /cfs2 /fs 8- /dll /debug /fullmat /softmat /specularcanopy note the space between exe and the first switch
I spent hours and hours wondering why it wouldn't work
Also if you use MdlCommander That will be renamed to Makemdl and Makemdl will be named mkmdl, in which case the target line would read

C:\gmax\gamepacks\CFS2_gamepack\plugins\mkmdl.exe /cfs2 /fs 8- /dll /debug /fullmat /softmat /specularcanopy

January 29th, 2011, 21:05
Steve open up the library tool kit
Open the Empty library template.sca in word pad
Save it as MyObjLib.sca

Use the GUID maker to generate a random hex number
Copy and paste it into ObjID , insert spaces every 8 digits to maintain the format

select the scale setting to match the export 0.001 if you exported an aircraft model
0.5 if you exported a scenery bgl

Chose a unique name for your object and make or copy a damage profile (DP) with the same name.

Grab object_0.asm and drag it to BGLC.exe

A new file object_0.bgl will appear, (this is a raw format bgl and cannot be used in flight sim )

drag the new file to raw2sca.exe

A new file will appear object_0.sca

back to MyObjLib.sca

where it says

Include( model_0.sca ) ;the normal objectchange it to read

Include( object_0.sca ) ;the normal objectBe sure to save changes
put all the relevent .sca files in the same folder as scasm.exe

In theory you should now be able to compile your library by dragging MyObjLib.sca to
scasm.exe; but it is never that easy
For best results invoke scasm with a command line or a batch file, the command line is simply

scasm.exe MyObjLib.scakeep your scasm source files names in 8.3 format

If you aren't making a damage model comment out the line

Include( model_D_0.sca ) ;the damage object

January 29th, 2011, 21:08
GUIDMaker and Raw2SCA are mine. BGLC is actually BGLC_9 ( just renamed ) which I extracted from FS2004 MakeMDL.

MakeMDL can use a makemdl.cfg file.

Optimize=1 // 0 turns OFF Optimize!

January 29th, 2011, 22:56
Holly Cow - WOW.
Thanks for the support guys, Looks like I will be busy setting up a custom SDK pack for GMAX first. Do you not recommend the "cfs2_Gmax_G_pack.zip"?

I'm sure I will have more questions as I begin to tinker around.

Thanks Again.


Robert John
January 30th, 2011, 02:01
Hi steve
When I started out same old problems as you
I was told this and told that and although the
information was all good sometimes it becomes
a bit fragmented. ie When I started out the
gamepack that came with fs2002 was not the
one you wanted,You need one that saves ASM.
The cfs2 gmax gamepack works ok.cfs2
gamepack is the one from the net,when I saw
the set up in fs2004 gamepack I thought about
doing the same for cfs2 Take it nice and slow
you will understand it in the end.
When compiling a library I was told you only
need one guild ,then I was told each objects
need a guild,Then it took me hours to give each
object a guild.
Over time you will discover new things.Eveyone
is very helpful.
I am still learning new things all the time.
Many thank to all that responded to your thread
they all helped me one way or another.
Good luck and Im here to help as much as I can.
Robert John

January 30th, 2011, 05:35
Holly Cow - WOW.
Thanks for the support guys, Looks like I will be busy setting up a custom SDK pack for GMAX first. Do you not recommend the "cfs2_Gmax_G_pack.zip"?

I'm sure I will have more questions as I begin to tinker around.

Thanks Again.

Hi Steve.

What's the link to cfs2_Gmax_G_pack.zip ? I ask because that's not a standard gamepack for gmax, and I don't know what's in it. If it produces FS2002 exports, then we can go from there.


January 30th, 2011, 10:39
That CFS2 game pack is not official, it is based on the fs2002 gamepack, I think the guy may have used a different Makemdl from one of the SDKs. Other than that theres no difference.

Once you grasp how the game pack is set up you will see that you can build your own and configure them for different purposes. The FS2004 gamepack contains a very instructive document
Installing the FS2004 GMax SDK over the FS2002 GMax SDK.

The only purpose of gamepacks is so that Gmax can be easily configured to build for different game platforms.
If you only intend to build for CFS2 then it is not necessary to use the gamepack system and plugins can go in the main \Gmax\plugins\ folder.

So, as always, there are different ways to achieve the same end. There is no single right way.
You will find a way that works for you.

I do not do enough Gmax modeling to be really proficient at all the tools.
But I have spent many hours studying scasm source code.

You will no doubt come across mention of something called Middleman, Its another plugin that gets inserted into the export chain like MDLcommander. It has a GUI that is pretty much the same as Makemdl with all the options enabled. I have never used it!

I might as well say something about the export chain in case that is causing some confusion.

As you may know Gmax is based on 3dStudioMax. (Very Expensive) It is compatible with all plugins and scripts that run on Version 4.
Gmax is free but comes with limited export functions, the games houses must pay for the export plugins.

For FlightSim and CFS2 the export plugin is called FSModelExp.dle

When in Gmax you chose to export something you should see the options, FlightSim BGL file or FlightSim MDL file.
(if you see different options FlightSim Cloud (*.CLD) FlightSim Scenery Object(*.MDL) FlightSim Aircraft Object(*.MDL) you are still using the FS9 version of FSModelExp.dle)
The two files have the same version number! But the FS9 version is 165kb and the FS8 version is 65kb

So you export your object.

FSModelExp.dle converts the Gmax data into an X file.
This is a DirectX format .txt file that describes your object.

In the normal scheme of things this X file is seamlessly passed to MakeMDL which then produces the BGLC assemblers and compiles them. (Makemdl contains a primitive version of BGLC called BGLML.exe and a load of headers and macros). All the intermidiate files are deleted.
Extra plugins like MDLcommander and or Middleman take the place of MakeMDL by renaming and can be instructed to capture and save the X file. For MDLcommander this is done with a parameter file that should reside in the folder you are exporting to and be named as per the export name i.e Object.par

# these are parameters for exporting my aircraft
# -b shut up (batch)
# -keep keeps all intermediate files .asm and such
# -i ignore warnings
# -i8- do not ignore bad triggers (might be important for stock anims)
# -in- do not ignore bad normals
# -viewlog view logs in case of error (only if -b deactivated)
+nocompileAs you can see the parameters I use save the X file and halt the final compilation.
This is because I construct CFS2 style Multi LOD objects. Where each LOD is exported separatly and saved as X files. I then manually run Makemdl to bring all the X files together.

Supper time , more later if you want it

January 30th, 2011, 11:50
Ok - I am seeing this message when exporting from GMAX.

I'm not sure if this is a standard warning or not so I thought I would ask. I have been seeing this warning ever since I began to use GMAX. It's warning me about the fact that my model is not stored in meters. But I selected "Meters" as you can see below. Just thought I would ask about it.
I have selected Metric as my units of measure.
I also have another question - I noticed one of my exports after installing into CFS2 is WAY out of scale as far as size goes.
Any recommendations on scale size? Does it matter if I use US Standard as my Units of measure in GMAX for scenery objects?

January 30th, 2011, 12:38
The scale issue you see in the sim is a result of the unit setting being incorrect.
What you see in your screenie is the units setup tab under the customise button.
Below that click Preferences... and check the System Unit Scale settings
1 Unit = 1.0 Metres

The settings are stored in the Gmax.ini that is in your gamepack (if you started Gmax from the shortcut in your gamepack)
If you load a scene that has different settings you will be asked what settings to use.
What ever you chose the scale will end up wrong and you will have to resize the object.
Make a calibration box that is the correct dimensions in metres. Then use the scaling tool to adjust your object till it fits the box.

January 30th, 2011, 14:23
Wow this is freaking FUN!
Ok - Sorry about that, it's just that I have not had this much fun in a LONG TIME.
This is awesome.

Ok - I think your post with the scale idea will help me out a lot.

I noticed though "In Game" that my object disappears after say 1500ft.
Any way to correct this?

Also I assume that since I have not created or included a Damage_object line in my bgl that would explain why I can fly straight through it and not get destroyed?

I'm having a BLAST doing this.