Howto:Place 3D objects with the UFO: Difference between revisions

Jump to navigation Jump to search
m
Small fixes, link to $FG_HOME and $FG_SCENERY
(Update, corrections, remove wrong/confusing isntructions)
m (Small fixes, link to $FG_HOME and $FG_SCENERY)
Line 1: Line 1:
The [[UFO from the 'White Project' of the UNESCO|UFO]] aircraft is a superb tool for placing a new (or old) 3D object at any arbitrary location in the scenery with just a few clicks of the mouse.
The [[UFO from the 'White Project' of the UNESCO|UFO]] aircraft is a superb tool for placing a new (or old) 3D object at any arbitrary location in the scenery with just a few clicks of the mouse. Placing objects in the scenery is a really easy way to contribute to the [[FlightGear]] project. It does not require any programming knowledge, and you can contribute something valuable in just a few minutes.


Placing objects in the scenery is a really easy way to contribute to the [[FlightGear]] project. It doesn't require any programming knowledge, and you can contribute something valuable in just a few minutes.
This article gives an overview of placing, editing and saving objects using the UFO. You can get a list of flying controls and editing commands by pressing the ?-key while flying the UFO.
 
Below is an overview of placing, editing and saving objects using the UFO. You can get a brief overview of the movement and editing commands by pressing ''?'' while flying the UFO.


== Choosing your object ==
== Choosing your object ==
Line 19: Line 17:
[[File:Placing_objects_with_UFO_html_m49fbed81.jpg|400px]]
[[File:Placing_objects_with_UFO_html_m49fbed81.jpg|400px]]


Now start FlightGear with the UFO as your aircraft.
Now start FlightGear with the UFO as your aircraft. When launching FlightGear from commandline, use <tt>--aircraft=ufo</tt>.


== Placing objects ==
== Placing objects ==
Once FlightGear has been started, fly with the UFO to the place you want the model to be positioned.
Once FlightGear has been started, fly with the UFO to roughly the place you want the model to be positioned.


[[File:Placing_objects_with_UFO_html_5fa8d7b1.jpg|400px]]
[[File:Placing_objects_with_UFO_html_5fa8d7b1.jpg|400px]]
Line 65: Line 63:
  OBJECT_SHARED Models/Tabu/catii-iii.xml 8.57928135 50.03667992 105.9972 111.1
  OBJECT_SHARED Models/Tabu/catii-iii.xml 8.57928135 50.03667992 105.9972 111.1


The first line identified the location of the scenery file for the object. The OBJECT_SHARED line indicates the objects name, longitude, latitude, altitude and orientation. This can be read by FlightGear itself and can be ([http://scenemodels.flightgear.org/contribute.php submitted]) to the FlightGear Scenery Object Database.  
The first line identifies the location of the scenery file for the object. The OBJECT_SHARED line indicates the object's name, longitude, latitude, altitude and orientation. This can be read by FlightGear itself and can be [http://scenemodels.flightgear.org/contribute.php submitted] to the FlightGear Scenery Object Database.  


You can also save these coordinates into your own scenery file so that your changes will not be lost the next time you start FlightGear.
You can also save these coordinates into your own scenery file so that your changes will not be lost the next time you start FlightGear.


== Saving the changes to your scenery ==
=== Saving the changes to your scenery ===
In the terminal window, you get three sections printed out by the UFO with very detailed information about what's going on. We need the lines at the end.
In the terminal window, you get three sections printed out by the UFO with very detailed information about what's going on. We need the lines at the end.


Line 76: Line 74:
  e000n50/e008n50/3089154.stg  
  e000n50/e008n50/3089154.stg  


The default location for scenery objects is <tt>[[$FG_ROOT]]/Scenery/Objects/</tt>. Simply open the referenced .stg file, add the OBJECT_SHARED line to the bottom and save the file. Now you have your object's position saved, and it will appear inside the scenery every time you start FlightGear!
The default location for scenery objects is <tt>[[$FG_SCENERY]]/Objects/</tt>. Simply open the referenced .stg file, add the OBJECT_SHARED line to the bottom and save the file. Now you have your object's position saved, and it will appear inside the scenery every time you start FlightGear!


In our example we would open in <tt>[[$FG_ROOT]]/Scenery/Objects/e000n50/e008n50/3089154.stg</tt> and add the following line.
In our example we would open in <tt>[[$FG_SCENERY]]/Objects/e000n50/e008n50/3089154.stg</tt> and add the following line:


  OBJECT_SHARED Models/Tabu/catii-iii.xml 8.57928135 50.03667992 105.9972 111.1
  OBJECT_SHARED Models/Tabu/catii-iii.xml 8.57928135 50.03667992 105.9972 111.1
Line 88: Line 86:
{{#ev:youtube|e93OUEp0YKc|400|center}}
{{#ev:youtube|e93OUEp0YKc|400|center}}


== Saving to XML ==
=== Saving to XML ===
 
Alternatively, if you press the ''e'' key while developing scenery with UFO, FlightGear will generate a xml file with the dump of your current work in an "ufo-model-export.xml" file under [[$FG_HOME]].
Alternatively, if you press the ''e'' key while developing scenery with UFO, fgfs will generate an xml file with the dump of your current work in a "ufo-model-export.xml" file.  
 
Under Unix, the file is saved to directory ''~/.fgfs''
 
Under Windows it is saved to ''%APPDATA%\flightgear.org''. Under a typical Windows installation the file will look something like this:
 
  C:\Documents and Settings\{YOURUSERNAME}\Application Data\flightgear.org


=== Loading the XML file as part of FlightGear scenery ===
=== Loading the XML file as part of FlightGear scenery ===
Line 104: Line 95:
  fgfs --config=$HOME/.fgfs/ufo-model-export.xml
  fgfs --config=$HOME/.fgfs/ufo-model-export.xml


In Windows, this is done using the Advanced dialog, found on the last panel of the [[FGRun]] GUI. Click Advanced and, under General, click the double-dot button, browse to the ufo-model-export.xml file and click OK.
In Windows, this is done using the Advanced dialog, found on the last page of the [[FGRun]] GUI. Click Advanced and, under General, click the double-dot button, browse to the ufo-model-export.xml file and click OK.


== Sharing your updates with everyone! ==
== Sharing your updates with everyone! ==

Navigation menu