Sign in to follow this  
JMEppright

GMAX and FS file path

Recommended Posts

I am migrating from FSDS to GMAX. I've got GMAX installed and have been through the SDK tutorial and am beginning to grasp the fundamentals of object design. What I haven't grasped yet is the movement from GMAX object to FS9 recognition and display of same object. In accordance with documentation I read, MakeMDL is installed and then Middleman on top of that according to appropriate docs. I can produce the MDL file but in FSREGEN I am looking for a .ASM file. What is this and where does this fit in with the MDL file I produced earlier? Once I get the various utilities coordinated and working together, I'll be off and running. All help is much appreciated.Mike Eppright (KOJC)

Share this post


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

Mike, what sim you designing for? I know of no reason to use middleman, what made you choose to do that?for Fs2002, use the latest makemdl for 2002, this allows options of Keep files. THat's all we did with middleman.without middleman, using keep options gives you both the bgl and asm. If you wish to manipulate the asm, either to make library objects, or to attach custom animation or whatever, then you delete the bgl and recompile the asm afterword.If you are working for fs2004, then forget fsregen...and forget middleman.the fs2004 won't allow options by itself, mdl commander will allow an intercept of mdl file, but manipulating the source code is still in the experimental stage.in 2004, you would normally export the mdl file and xml file...which contains your guid that you'd call in a normal xml scenery object command code.Bob Bernstein

Share this post


Link to post
Share on other sites

Bob,I may be mixing tutorials and SDKs. I am trying to develop for FS2004. I want to create objects in GMAX to place using SceneGenX. What other options exist for object placement? Using FSDS for objects and Airport to place seems so easy. Am I making this harder than it is? Thanks for your help.

Share this post


Link to post
Share on other sites

I understand how you feel. I went thru that period too. While I was an fsds user, making macros seemed like the logical way. After using gmax for a while, I decided it was just extra work. I may do it still for certain objects that get reused a zillion times, but only then.I create a background map either way. I knew the resolution of my background map...and if you don't..just figure it out based on the runway length and number of pixels in your image of the runway.Once you know your resolution, its easy to figure out how many meters it is wide and long. Then I make a box that size in gmax, and past the image on that box. Now I calibrate the boxes placement by drawing a second box in gmax the size of the runway. For this discussion, lets call the background box, box1, and the runway shaped box, box 2. Move both boxes together until the 0,0 crosshairs lay over one end of the runway. Then I export box2 which gives you box2 mdl file, and box2 xml file. Now open fs2004 and place your airplane at the end of the runway that is 0,0 in gmax. write down the coordinates, I like to have afcad open which gives me more accurate coordinates, but anything close will get you going.Open the xml file and write the coordinates in over the sample ones. delete the comment lines, and compile using bglcomp. Syntax is bglcomp myfile.xml. Now install a scenery folder with that bgl into fs2004, and check your alignment. If the box2 doesn't sit on the runway, adjust as required. As long as your adjust in GMAX keeping the two boxes moving together, once you get the runway box perfect in fs2004, your background box is a good basis to place all the rest of your objects.you'll notice that after the first compile, your xml file is not overwritten, only the mdl file. That's neat, as you don't have to mess with the coordinates again. Just recompile the same xml file as the first time, and the new mdl content will get used rather than the old.Although its a tiny bit fiddly, I always had to do just about the same thing getting an airport background to be perfectly aligned...The nice thing, is once your set, you no longer need to fiddle with macros.Have fun!Bob Bernstein

Share this post


Link to post
Share on other sites

Bob,I'm making progress. I removed Middleman, Reinstalled MakeMDL as you suggested. I have created a library to hold GMAX objects of which one sample object exists. Using ScenGenX I can place a runway, but placing created object is still illusive. I copy the GUID from the object XML file and then paste that GUID into the 3D object page. With or without the created object, I get an error message when I compile in SceneGenX. It is pasted below. Any ideas?Parsing document: C:AIRPORT FOR WINDOWSSCENEGENXKOJC.XMLERROR C2033: XML Parse Error (line, column, error)ERROR: 124, 35, enumeration constraint failed.The attribute: 'imageComplexity' has an invalid value according to its data type.ERROR C2038: Failed to process image complexity!ERROR C2031: Failed element parse ERROR C2032: XML Parse Error! Element tree follows:ERROR: ERROR: ERROR: ERROR C2411: 'Library object' found outside of a SceneryObject!ERROR C2031: Failed element parse ERROR C2032: XML Parse Error! Element tree follows:ERROR: ERROR: ERROR: ERROR: ERROR C2151: Missing scenery object data (LIBRARYOBJECT, EFFECT, GENERICBUILDING, etc.)ERROR C2338: Failed to finalize BGL for scenery object!ERROR C2032: XML Parse Error! Element tree follows:ERROR: ERROR: ERROR: ERROR C2024: Failed to process closing element tag near line 128!ERROR: Compilation errors detected, compilation failed!Parse complete!=====================Thanks,

Share this post


Link to post
Share on other sites

Mike, you'll find xml is a bit fussy, the need for its syntax to be followed precisely makes it difficult to use. I'm frustrated by the times this happens to me, but I normally find the error. This one looks solvable, but you'll need to post the actual xml file before we can set it right.I'm not aware of scenegenx..so I'm not clear on what that is, but I'm assuming its a front end that sends xml code to bglcomp...right? If so, can you save out the xml code prior to compile? that's what we need to see.B

Share this post


Link to post
Share on other sites

Hi Bob,SceneGenX (SGX) is the new tool developed by Tom Hixcox and probably Brian McWilliams of Airport for Windows scenery design program. It is available from http://www.airportforwindows.com/ . As you indicated, it provides a familiar AFW front-end but compiles using BGLCOMP.exe.W. Sieffert

Share this post


Link to post
Share on other sites

Hi Bill, thanks for the note....I suspect we've all faced this annoying failure to "parse" when the xml looks perfect. I wonder how Tom is dealing with that.B

Share this post


Link to post
Share on other sites

Bob,Thanks for the help. I'll try and attach the XML file. With these complications it seems like I need to find a way to convert GMAX files to API files for use in the proven "Airport" until ScenGenX matures more.

Share this post


Link to post
Share on other sites

do you have fs2002 pro? If so, you can use the fs2002 version of the gamepack while you work out the bugs in the fs2004 version.B

Share this post


Link to post
Share on other sites

You can make a library out of your GMax objects with the XML code (or the GUI Library Creator XML I have made).Then, until the XML tools are more stable, you can make a simple calling macro that calls these objects. This macro would just look like this, but with your GUID in it of course:[tt]Area( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ )jump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTcallLibobj( 0 11111979 14122000 12042003 9 ):ENDreturnEndA[/tt]It's not a really perfect solution of course, because you start mixing the new and the old BGL formats, but it will work.

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