tS to MS Flight Sim Section 1 - Basic conversion procedures

Game Engines, Projects and more
Post Reply
User avatar
3DPDK
Petty Officer Third Class
Posts: 10
Joined: 28 Mar 2010, 22:11

tS to MS Flight Sim Section 1 - Basic conversion procedures

Post by 3DPDK »

tS to MSFS Section 1 - Basic Model and conversion procedures

Ok, since I started this in this board, I'll just continue it here. As I write the various sections I am also creating a down-loadable version in both RTF and PDF format that I will provide a download link at the end of each post for that section.

Before proceeding, be sure you have downloaded and installed the MakeMDL SDK. I have created a shortcut icon and placed it out on my desktop to further simplify the process. To do this, navigate to Program Files > FS2004SDK > MakeMDL_SDK >, right click on the MakeMDL exe file and select “Create Shortcut”. Now move that shortcut out to your desktop or even your “Quick Launch” portion of your task bar.
Image

For those of you who are really anxious for that “self gratification” of seeing their first aircraft flying around the Flight Simulator world, we can do that pretty quickly …

but there is one “organizational” step that if we do it now, will simplify the conversion process a great deal!
____________________________________________________________
Aircraft Container Setup
Step 1:
  • Decide on what type of aircraft you want to model. For your first aircraft I strongly recommend picking a design that is similar to one you already have in your FS Aircraft folder. One of the default aircraft is even better because the “aircraf.cfg” file parameter multipliers will all be set to 1 which means your aircraft will draw it's flight characteristics mainly from the “*.air” file. What this means later on when you are “tweaking” your bird's flight characteristics is that you will be tweaking from a zero starting point rather than trying to overcome the “forced” flight characteristics of someone else.

    I sort of hacked out a quick design that resembles a symmetrical wing, high performance stunt aircraft, and the closest match to that in the FS hanger is the Patty Wagstaff “Extra300”.
Step 2:
  • Navigate to the Microsoft Games > Flight Simulator > Aircraft folder and create a new folder. Rename this new folder to what ever you want to call your aircraft. Note – the name of the folder does NOT show up in the aircraft selection process in FS so this is strictly a matter of your preference and convieniance.
Step 3:
  • Find the aircraft that most closely approximates your new design and open that folder. In my case I am looking for the “Extra300” folder. Select all folders and files in that main folder; right click on any one of them and select “Copy” from the pop-up context menu;
    Image

    open your new (empty) aircraft folder; right click anywhere in the window and select “Paste” from the pop-up menu.

    Image



    Your new aircraft folder will now show the folders “panel”, “texture”, “model”, and “sound”.
    Image

    Any one of these could possibly have duplicates such as “texture.1”, “sound.1”, etc. This indicates that the aircraft you copied has more than one selectable variation. (See Aircraft Container SDK) You should also have one “aircraft.cfg” file and one “any name.air” file.
Step 4: open the “aircraft.cfg” file in a plain text editor like NotePad or WordPad and change these lines:
_________________________________________________
    • [fltsim.0]
      title=Tut (optional)
      sim=Tut (Change the name of the “*.air” file to exactly what you have written here! … does not matter what you call it as long as the two match exactly.) In my case I will change Extra300.air to Tut.air
      model=
      panel=
      sound=
      texture=
      kb_checklists=Extra300S_check
      kb_reference=Extra300S_ref
      atc_id_color=0xffff0000
      atc_id=N68PW
      ui_manufacturer=AAA (I use “AAA” so my aircraft will be listed first in the aircraft selection window in FS
      ui_type="300S"
      ui_variation="My First trueSpace Aircraft" Optional aircraft selection window variation description.
      description="If airplanes were bla bla bla bla ......."
_____________________________________________________
  • At this point, as long as your aircraft is similar in size, engine and landing gear configuration as the FS original, do not attempt to “tweak” any of the parameters found below this first “fltsim.0” section!

    Save this file and do not change the name or file type; ie, Save As “aircraft.cfg”
Step 5:
  • Open the “model” folder and open the “model.cfg” file in a plain text editor. You will see at least these two lines:
    • [models]
      normal=Extra300
    Decide what you will call your trueSpace “X” model file and change the second line to that name. In my case I'm calling this first demonstration model “Tut” - so
    • [models]
      normal=Tut
    Save this file. Do not change it's name or file type extension.(Save AS ... “model.cfg”
___________________________________________
MODELING:

OK! Done with the paper work. Go make a model aircraft! You might want to keep it simple to start!

Here's mine in trueSpace; a fuselage, wings, canopy, and stabilizers. and painted simply with a basic white PHONG shader, no image texture, yet. This is fine as MakeMDL and Flight Simulator both know what to do with simple PHONG colors and specular shine. (See final image at bottom of post)
Image
Notice a couple of important things about this image.
  1. The model orientation relative to the X,Y,Z “world” axis in trueSpace. The fuselage sits length-wise along the Y axis and the wings are length-wise along the X axis. This orientation matches the MakeMDL default settings! A different orientation may be overcome with some of the selectable options in MakeMDL but by simply orienting you model this way from the start, eliminates a lot of headache further down the modeling process.
  2. Notice also that the axis for the fuselage alone matches the tS world axis in that positive Y goes BACK towards the tail of the aircraft and positive X goes out over the left wing.
  3. Notice the axis location for the fuselage. In Flight Simulator, this represents the center of gravity for the aircraft. When tweaking the aircraft.cfg file it will be easiest if this is centered just behind the highest point of the wings cross section, dead center of the fuselage's centerline, and at an “intuative” point, center or just below it in the fuselage side view.
    In a later section, I will show a non-mathmatical method of locating the center of lift for a swept wing aircraft like an F-16 ... but later for that.
Image

The relationship between an aircraft's center of gravity and it's center of lift is normally the other way around in the real world, but in the Flight Simulator world your aircraft will behave better if you set it up this way.

There are other axis orientations to consider when modeling rotating or hinged parts but for now we are not concerned with any other axis on this model.

_________________________________________________
EXPORT:

Step 1:
  • Start by selecting the fuselage! Reason: as you add other parts to the selection, they become “children” of the fuselage's “frame” in the X file and use the fuselage's axis for their orientation and relative position. Since we spent time orienting the fuselage's axis to coincide with the Flight Simulator world and the aircraft center of gravity we want all other parts of the aircraft to be measured and “rotate” in FS from that point.
Step 2:
  • Now select all other parts of the aircraft – it doesn't matter in what order.
Step 3:
  • “Save as ...” Be sure to select “X” in the format options box (Save as Type). Click on the “Settings” button and check ONLY two options:
    Image

    This is an image of tS 6.6 save dialog. The tS 7.6 (model side) save dialog is somewhat different looking but basically: Do triangulate and Do Center and Normalize. Select no other options.

    Now save the X format model file in Flight Simulator > Aircraft > Your Aircraft > Model > folder.
Step 4:
  • Click the MakeMDL shortcut to start the program:
    • Tab 1 (Main):
      • select the X format model you just saved from trueSpace. MakeMDL will automatically set the same path as the save path for the converted MDL model. If you want it saved somewhere else you can set that up. I personally like both the X model and MDL model together in the aircraft model folder. When I'm doing a serious model I will also save a copy in .COB, too! By default MakeMDL assumes it is converting an aircraft model. Change this option if you are converting a scenery model. We'll discuss this later.
        Image
      Tab 2 (LOD): We will cover this when adding the interior model.
      Tab 3 (Options):
      • For this simple model we can use the default options. As the model increases in complexity I will uncheck “Weld Points” and unless I actually include a “Crash” mesh and texture, I will uncheck “Crash” and “Has Damage Map”. Occasionally, to work around MSFS display or shading anomalies you must add an extra edge extremely close to a normal edge. With “Weld Points” checked MakeMDL can eliminate the seemingly duplicate edges, thereby defeating your efforts to overcome these display anomalies.
        NOTE: Many of these options in this tab take the place of the X file templates mentioned in the SDK instructions meant to be added to the GMax export. (50 extra points for Microsoft! :bananacool2: )
        Image
      Tab 4 (Scenery):
      • Disabled by Microsoft. The location of scenery objects is now listed in XML files included with the scenery model.
      Tab 5 (Output):
      • Open this to see the text output as MakeMDL works. You only need this if you uncheck the “View Error Log” option.
    As I said, this is really only important after your model becomes complex with animations. Unchecking these options if not needed will speed up the conversion process. I'm not impatient, but it can appear as though MakeMDL has hung up in the middle of the process and cause a few extra gray hairs! With this simple model I can run MakeMDL with all the default options checked.
Click on "Start" and wait for MakeMDL to finish it's run. Since the model is fairly simple at this stage, about the only error you may get is a "model mesh" error or "duplicate vertex" error, both of which most commonly occur if you have used tS's mirror modeling function on a part who's mirror plane is not perfectly flat! Unfortunatly you will have to manually hunt for these stray or duplicate vertex and delete or weld them to correct the error. Having "Weld Points" checked in the MakeMDL options will NOT correct these errors.

FLY:
If you have set up your folders and altered the aircraft and model cfg files as explained above you should be able to run Flight Simulator, open “Select Aircraft”, find your aircraft, select it and fly it! Just remember that you are actually flying the aircraft you selected to copy it's aircraft.cfg, but you will get an idea of how your aircraft will look and feel once you customize it's flight characteristics.
Image

Notice that Flight simulator displays PHONG colors and specular shine very well! Transparancy can be "manually" included in the X file material listing as well. (more on that next time). Also notice that PHONG shading and colors will show the display anomalies I spoke of more. (Look at the different shadings on the white version.) Some of them will go away when a bitmap texture is applied, some will be disguised by an image texture and some must be "forced" away.

Even though the model in tS is sitting as it would in straight and level flight, it is using the "contact points" of Wagstaff's Extra300s' landing gear found in the aircraft.cfg file. The Extra 300 is a tail dragger so that explains why my plane is sitting nose high.

One last tip: Set your tS grid to = feet if you are used to thinking in US measurements. The tS grid in this case; 1 square = 1 foot. Using that to judge the scale of your aircraft will put you in the ballpark. You can then place your aircraft at an airport with other aircraft and do a visual comparison in size. Adjusting the scale now while your aircraft is in this simple form will be a lot easier than after you have added moving and animated parts.
Post Reply