Howto:Add shared models manually: Difference between revisions

Jump to navigation Jump to search
General cleanup
(→‎Adding Shared Models: more detailed and accurate instructions)
(General cleanup)
Line 1: Line 1:
{{cleanup}}
You can add your own objects, known as "shared models" to FlightGear's world.  This howto explains a few ways to do so.  It assumes that you already have a model. There are many that come standard with FG; they are stored in the <tt>[[$FG_ROOT]]/Models</tt> directory. 


Note: You may include scenery objects in any format that PLIB supports. Currently, this means in addition to the 3ds models mentioned, you may use AC3D and other formats. This howto assumes that you already have a model. If not, create one using a suitable modeling program such as [http://www.blender.org/ blender].
You can also create one using a suitable modeling program such as [http://www.blender.org/ blender].  You may use any format that PLIB supports. Currently, this means in addition to the 3ds models mentioned below, you may use AC3D and other formats.  


== Adding Objects to FlightGear's World ==
 
Here are instructions on how to add objects (known as "shared models") to the current version of FlightGear, either a model that you've created or one of the models that comes with FG.
== Adding Shared Models to FlightGear's World ==


=== Step 1 ===
=== Step 1 ===
If you plan to use one of the standard FG models that are stored in the <tt>[[$FG_ROOT]]/Models</tt> directory, skip to step 4.
If you plan to use one of the standard FG models, skip to step 4.


If you created your own model, create a directory under <tt>[[$FG_ROOT]]/Models</tt>. We'll use <tt>$FG_ROOT/Models/MyModels</tt> as an example.
If you have created your own model, create a directory under <tt>[[$FG_ROOT]]/Models</tt>. We'll use <tt>$FG_ROOT/Models/MyModels</tt> as an example.


=== Step 2 ===
=== Step 2 ===
Line 60: Line 60:
  OBJECT_SHARED Models/MyModels/MyModel.xml -55.5 30.3 1000.0 0.00  
  OBJECT_SHARED Models/MyModels/MyModel.xml -55.5 30.3 1000.0 0.00  


The format is :
In brief,the format is :
  OBJECT_SHARED relative_path_to_model_file longitude latitude altitude_above_sea_level_(meters) ellipsoid_ROTATION
  OBJECT_SHARED relative_path_to_model_file longitude latitude altitude_above_sea_level_(meters) ellipsoid_ROTATION


The path is relative to the $FG_ROOT directory.  If you have an XML file for the model, specify it here, otherwise specify the .ac file.
The path is relative to the $FG_ROOT directory.  If you have an XML file for the model, specify it here, otherwise specify the .ac file.
There are more details on the .stg file format below.


Alternately, there is a way to include this same information in XML configuration files that are loaded at runtime; see [[Howto: Place 3D objects with the UFO]] for more details.  This approach has the advantage of keeping your new scenery clearly separate from the standard scenery files without having to create your own custom scenery directory structure.  However it requires either manually loading the config file from the command line or mentioning it in one of the standard startup files (such as [[.fgfsrc]]) and having it loaded every time you start FG, whether or not you are going to be flying in the area.  If you place the scenery information in .stg files, it is only loaded when needed.
Alternately, there is a way to include this same information in XML configuration files that are loaded at runtime; see [[Howto: Place 3D objects with the UFO]] for more details.  This approach has the advantage of keeping your new scenery clearly separate from the standard scenery files without having to create your own custom scenery directory structure.  However it requires either manually loading the config file from the command line or mentioning it in one of the standard startup files (such as [[.fgfsrc]]) and having it loaded every time you start FG, whether or not you are going to be flying in the area.  If you place the scenery information in .stg files, it is only loaded when needed.

Navigation menu