Jump to content


* * * * * 1 votes

How To Export A Model To FSX


  • Please log in to reply
16 replies to this topic

#1 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 25 October 2007 - 12:37 PM

Hi,

I spent 3 days trying to export a Gmax model to FSX so I thought I would make a tutorial so people know how to export a model properly without getting any errors like I had.

Get Organised

Ok, first we have to make out folders to work in. Make the following folders:

- C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial
- C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery
- C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Texture

These are the folders where all of our work will be placed. You can put a shortcut on your desktop to easy access if you want.

Get your Textures

You will need to download the following texture to use on your Box (Just right click and click on Save Picture As...)

Posted Image

When using A texture with Gmax, the texture must have a width and height a power of two for D3DRM to work. The texture above is 512 x 512.

Time To Build!

Now open Gmax and load the FSX_GMaxGamepack. This will allow us to create a GUID and export the file as a .MDL file.
When Gmax has loaded, click on the Box button and draw a simple box in the perspective section. We will be applying out texture to this very soon.

Your monitor should be displaying something like this:

Posted Image

The size and shape of the box doesn't matter in this tutorial.

Applying The texture

Right mouse click on your box and select Convert To: > Convert To Editable Poly. Now click on the 3D Box (Element) Button (Screenshot below)

Posted Image

This means that when we apply the texture, it will apply it to the whole box, not just one face.

Now click on The Gmax Materials Editor Button (The round red ball - Screenshot Below)

Posted Image

This will then open the editor, Click New then double click Standard.

Your monitor should now show something like the following:

Posted Image

Click on the grey button next to Defuse and you should get a window like the following:

Posted Image

Double click on Bitmap and open your texture that you saved earlier ( In the directory C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Texture)

You will now get loads of options for editing your texture but we don't need to do that now. Just click on the little blue and white Box and then the Black Arrow next to it. Click on the Blue and white Box Again and then click apply. Your box should now look like this:

Posted Image

Now very attractive is it? Just close the current window and click on Modifiers > UV Coordinates > UVW Map

Select Box from the right hand panel. Your box will now have a texture on it:

Posted Image

Create A GUID

To create a GUID for your Object, just go to FSTools > LODNameTool then click on the button 'Create New GUID For This File'. Gmax will then ask you to create a friendly name for your box. Call it Box and close that window.

SAVE YOUR GMAX FILE IN C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery.

Create Your xml file.

With the FS2004 SDK, Gmax wrote the xml file for you but things have changes in 2 years and now you have to write the xml file yourself. I have included a sample below - just edit the things in bold.

<?xml version="1.0"?>
<FSData
version="9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

<SceneryObject
lat="S33 25.07"
lon="E149 39.16"
alt="0"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="NORMAL">

<LibraryObject
name="{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}"
scale="1.0"/>

</SceneryObject>
<ModelData sourceFile="Box.MDL" />

</FSData>

The xml file needs a GUID, go back to your Gmax file and go to File > File Properties... and click on the Custom Tab. The GUID is in there but you have to type it out yourself, it won't let you copy it. Type the GUID into the
<LibraryObject
name="{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}"
scale="1.0"/>
section of your xml file.

Time To Export

In Gmax, go to File > Export... Locate this folder:

C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery

and export the model as a Flightsim Model *.MDL You will then get the following Window - Chosse all the options that I have chosen:

Posted Image

It will export the Gmax file to

C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery

but save it as a .MDL file.


[b]Putting The Model Into The Simulator


Move your xml and MDL file to C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\BGL Compiler SDK. Just drag the xml file onto the BglComp.exe and it will  create a bgl file for you to put in your addon scenery folder. Before you place the BGL file into your C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery folder, you need to convert your texture to a DDS file. Follow the steps below to do so.

[b]JPG To DDS


Go to the folder C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Terrain SDK and run ImageTool.exe. Now click File > Open and locate your Texture.jpg file. Click open and the texture file will spear in the workspace.
Click on Image > Create MipMaps. This will create about 10 copies of the texture, each getting smaller. Now click on Image > Format > DXT 1.
Now save the file as Texture.DDS and place it in C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Texture

IMPORTANT - DO NOT ENTER ANOTHER NAME FOR THE DDS FILE, YOUR BGL FILE WILL BE LOOKING FOR THE ORIGINAL FILE NAME, NOT THE NEW ONE.

Now you can place your BGL file into C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\Scenery and run FSX!

You will need to add the Exporting Tutorial folder into your Scenery Libary and then your scenery is ready to be viewed!


Please tell me if there is any problems with the instructions above and I will sort them out. Also make any other suggestions if you with.

Hope that helps,

John

Edited by John., 16 April 2009 - 10:59 AM.


#2 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 27 October 2007 - 01:44 PM

What? No Comments? :lol:  :lol:

#3 mr.bojangles

mr.bojangles

    Student Pilot

  • Members
  • PipPip
  • 21 posts

Posted 27 October 2007 - 02:30 PM

nice tut! awesome job

#4 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 27 October 2007 - 04:52 PM

Thanks  :lol:

Steve

#5 winxpro

winxpro

    Private Pilot - VFR

  • Members
  • PipPipPip
  • 135 posts
  • Location:Stourbridge

Posted 02 April 2008 - 05:24 AM

this will help me :lol:

#6 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 02 April 2008 - 08:40 AM

That's Good :lol:.

#7 Prash

Prash

    Orville Reincarnate

  • Members
  • PipPipPipPipPipPipPip
  • 5,317 posts
  • Location:UK, England

Posted 07 April 2008 - 01:15 PM

congwadulation! (no spelling eroor)

great tut mate l;)

#8 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 07 April 2008 - 02:08 PM

Thanks :lol:

#9 The_Great_North

The_Great_North

    Airline Transport Pilot

  • Members
  • PipPipPipPipPipPip
  • 2,268 posts
  • Location:Left my heart in SA

Posted 24 May 2008 - 08:51 AM

Grea tutorial-but how do i get FSTools?   :lol:

Thanks!

#10 John.

John.

    Private Pilot - IFR

  • Members
  • PipPipPipPip
  • 577 posts

Posted 24 May 2008 - 10:10 AM

You need to have the FSX_GMAX_Gamepack installed (see the FSX SDK documentation for information about the location of files and instructions of how to install)

#11 b_spanjer

b_spanjer

    Passenger

  • New Members
  • Pip
  • 1 posts

Posted 08 April 2009 - 08:13 PM

hey Frosty....I like you tutorial.  Im getting to the part where i drag my xml file over BglComp.exe but i get an error (it flashed the DOS window so I take a screen shot to see the error) it tells me ERROR: 18, 47, Illegal qualified name character.  When I check the line, column it is talking about the name="{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}" [b]
I copy and pasted this whole thing into notepad to create the xml file.  I don't understand what is wrong with the b character....can anyone help me.

#12 .Steve

.Steve

    Private Pilot - VFR

  • Members
  • PipPipPip
  • 374 posts
  • Location:United Kingdom

Posted 09 April 2009 - 10:40 AM

It looks like there is an error with the tutorial, There is a [b] after the GUID which shouldn't be there.

Remove the [b] from your xml file and try compiling it again.

#13 pierrecor

pierrecor

    Passenger

  • New Members
  • Pip
  • 2 posts

Posted 15 June 2009 - 03:10 PM

Excellent article.  .Steve is corretc by removing the [b] - propably a slip in generating the article.  There are som many article out there how to but nowhere is a compilation of all. Since I am new to scenery design (and a systems architect/designer/developer) I would like to see an app follwing the steps like this document - perhaps SbuilderX313 would do the trick.

P


I would not save the texture as DDS, rather use BMP.  Also you do not explicity say in the beginnig where to save the image and in what format.  GMax does not read JPEG which is the default extension for "Save as..." You need to convert the image into a BMP.  Talking about images, I'll get a little bit more organised by adding another folder  "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Exporting Tutorial\img" for your original image files.  When "Save as..." with the ImageTool save it then to the texture folder as a bmp.  Otherwise no errors except the [b] in the XML file structure.

#14 Rui

Rui

    Passenger

  • New Members
  • Pip
  • 1 posts

Posted 17 June 2009 - 08:07 PM

Hi John

This is a good tutorial. Please help me find out what I'm doing wrong because after trying to export a building for a hundred times I've had no success.
- The model was created in GMax with textures.
- GMax created a GUID and saved the MDL file.
- BGLCOMP created the BGL file.
- ImageTool saved the textures as DDS file.
All seemed to be allright and no errors at all were shown.
BGL  and DDS files created were correctly copied in their correct places in FSX
When I run FSX, it recognizes the new files and updates indexes...
But when I go to the place where my building should be it doesn't show any building at all.
This is unbelievable, I'm getting crazy.
Do you have a clue?
Thanks

#15 pierrecor

pierrecor

    Passenger

  • New Members
  • Pip
  • 2 posts

Posted 03 July 2009 - 07:40 AM

I had a similar experience - try NOT to save the image as a DDS file, rather use the BMP format with DTX1 implied on the texture.  Furthermore I assume you have placed the object in the correct position.

#16 Spam

Spam

    Commercial Pilot

  • Members
  • PipPipPipPipPip
  • 1,298 posts
  • Location:EGFF

Posted 27 November 2009 - 05:46 PM

Right im clearly going wrong somwhere by here  :hrmm:  i have created my guid..Ive exported my file from gmax...And obtained my .mdl and a xml file. I have edited the xml file just like yours putting my coordiantes in and the guid refrence name and the mdl name. I stick the two files in the BGLcomp folder and drag drop the xml onto the compiler. but with no luck i don't see a bgl file being created  :hrmm:


heres the xml.

<?xml version="1.0"?>
<FSData
version="9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd" >

<SceneryObject
lat="N33 55.39"
lon="W116 51.05"
alt="0"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="SPARSE">

<LibraryObject
name="{taxilights}"
scale="1.0"/>
</SceneryObject>

<ModelData
sourceFile="groundobjects.MDL" />
</FSData>

Edited by spam3d, 27 November 2009 - 05:46 PM.


#17 Spam

Spam

    Commercial Pilot

  • Members
  • PipPipPipPipPip
  • 1,298 posts
  • Location:EGFF

Posted 07 November 2010 - 07:28 AM

can i ask how would you have it so that you had a night texture and a day texture?