Howto:Convert objects from X-Plane: Difference between revisions

Jump to navigation Jump to search
m
wikilinks + categorised + license warning
m (wikilinks + categorised + license warning)
Line 1: Line 1:
This tutorial explains how to convert Microsoft(R) Flight Simulator (MSFS) scenery objects to the AC3D format (.ac) used by Flight Gear.  
This [[:Category:Howto|tutorial]] explains how to '''convert Microsoft(R) Flight Simulator (MSFS) scenery objects''' to the [[File_Formats#.2A.ac|AC3D format]] (.ac) used by [[FlightGear]].  


We will use the fs2xplane package by Jonathan Harris to first convert the model from MSFS to X-Plane. Then, we import this X-Plane model in blender, using the XPlane2Blender import filter (also by Jonathan Harris), from which we export the model to FlightGear's native AC3D format. Finally, we extract the lat/lon coordinates from an xml file, and place the object in FlightGear.
We will use the fs2xplane package by Jonathan Harris to first convert the model from MSFS to X-Plane. Then, we import this X-Plane model in [[Blender]], using the XPlane2Blender import filter (also by Jonathan Harris), from which we export the model to FlightGear's native AC3D format. Finally, we extract the lat/lon coordinates from an xml file, and place the object in FlightGear.


This method has been tested OK on a couple of scenery objects made by [http://www.helles-flusi.de Helfried Miersch] for MSFS 2004. I did not test it with models from other sources, yet.
This method has been tested OK on a couple of scenery objects made by [http://www.helles-flusi.de Helfried Miersch] for MSFS 2004. I did not test it with models from other sources, yet.
Line 7: Line 7:
I've written some bash scripts to ease the conversation a bit. They have been tested on Gentoo Linux. I have no idea about Windows or Mac scripting, however, the manual procedure of conversation should work on Windows, Mac and Linux.  
I've written some bash scripts to ease the conversation a bit. They have been tested on Gentoo Linux. I have no idea about Windows or Mac scripting, however, the manual procedure of conversation should work on Windows, Mac and Linux.  


'''Please note: objects that are uploaded to the [[FlightGear Scenery Database]] (and thus official FG scenery) must be released under the [[GNU GPL]] license. Most MSFS scenery does ''not'' comply with this license. Therefore, it cannot be included with the official scenery, unless the author granted you permission to release his work under GNU GPL.'''
==What do we need?==
You will need the following tools:
You will need the following tools:


* an X-Plane installation (demo works for me)
* an X-Plane installation (demo works for me)
* [http://www.blender.org blender] (tested on ver. 2.48a-r3)
* [http://www.blender.org Blender] (tested on ver. 2.48a-r3)
* XPlane2Blender (ver 3.09) and fs2xplane (ver 3.11) from [http://marginal.org.uk/x-planescenery/tools.html Jonathan Harris' page]
* XPlane2Blender (ver 3.09) and fs2xplane (ver 3.11) from [http://marginal.org.uk/x-planescenery/tools.html Jonathan Harris' page]
* FlightGear source
* FlightGear source
Line 33: Line 36:
Adjust the paths in msfs2ac.profile according to your setup:
Adjust the paths in msfs2ac.profile according to your setup:


* FG_SRC must point to your FlightGear source,  
* [[$FG_SRC|FG_SRC]] must point to your FlightGear source,  
* XPLANE must point to the X-Plane custom scenery folder, e.g.
* XPLANE must point to the X-Plane custom scenery folder, e.g.


Line 57: Line 60:
The -1 switch tells the script to pack all objects found in Bluewonder.zip into a single output file named Bluewonder.ac.
The -1 switch tells the script to pack all objects found in Bluewonder.zip into a single output file named Bluewonder.ac.


This will fire up blender. Do not touch the mouse nor keyboard until blender closes again. Import and Export of a single model might take some 30 seconds or so. You should now have a new folder containing the convertes model:
This will fire up Blender. Do not touch the mouse nor keyboard until blender closes again. Import and Export of a single model might take some 30 seconds or so. You should now have a new folder containing the convertes model:


  # ls -l fgfs/Bluewonder/
  # ls -l fgfs/Bluewonder/
Line 90: Line 93:
  OBJECT_STATIC Bluewonder.ac            13.8101 51.0535 0  238.5            # e010n50/e013n51/3171139.stg
  OBJECT_STATIC Bluewonder.ac            13.8101 51.0535 0  238.5            # e010n50/e013n51/3171139.stg


The third number is the object's altitude. In Bluewonder.XML it is given [http://en.wikipedia.org/wiki/Above_ground_level AGL], however, in FlightGear, it is [http://en.wikipedia.org/wiki/Above_mean_sea_level MSL], so we have to guesstimate and correct it later on using the UFO or, even better, [[Howto:_Calculate_elevations|query the actual elevation]]. A good guess here is 120.
The third number is the object's altitude. In Bluewonder.XML it is given [http://en.wikipedia.org/wiki/Above_ground_level AGL], however, in FlightGear, it is [http://en.wikipedia.org/wiki/Above_mean_sea_level MSL], so we have to guesstimate and correct it later on [[Howto: Place 3D objects with the UFO|using the UFO]] or, even better, [[Howto:_Calculate_elevations|query the actual elevation]]. A good guess here is 120.


Add this line to FlightGear's scenery/objects/e010n50/e013n51/3171139.stg file
Add this line to FlightGear's [[$FG_SCENERY]]/Objects/e010n50/e013n51/3171139.stg file and move the model and textures from fgfs/Bluewonder to FlightGear's [[$FG_SCENERY]]/Objects/e010n50/e013n51/ folder.
and move the model and textures from fgfs/Bluewonder to FlightGear's scenery/objects/e010n50/e013n51/ folder.


Now fire up fgfs --airport=EDDC and fly about 4.5 nm hdg 145. You should find this:
Now fire up fgfs --airport=EDDC and fly about 4.5 nm hdg 145. You should find this:
Line 173: Line 175:


--[[User:Radi|Radi]] 22:07, 3 May 2010 (UTC)
--[[User:Radi|Radi]] 22:07, 3 May 2010 (UTC)
[[Category:Howto|Convert objects from MSFS]]
[[Category:Scenery enhancement|Convert objects from MSFS]]

Navigation menu