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

m
Template key press + Spelling
m (Small fixes, link to $FG_HOME and $FG_SCENERY)
m (Template key press + Spelling)
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. 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.
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.


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.
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 press|?}} key while flying the UFO.


== Choosing your object ==
== Choosing your object ==
Line 8: Line 8:
=== Creating your own models ===
=== Creating your own models ===
Alternatively you can create your own models. You should save it in a subdirectory of your [[$FG_ROOT]] folder. Two options seem reasonable, although others are possible as well:
Alternatively you can create your own models. You should save it in a subdirectory of your [[$FG_ROOT]] folder. Two options seem reasonable, although others are possible as well:
* Shared model, not unique to a single objects (for example a wind turbine): save it in a subdirectory of <tt>[[$FG_ROOT]]/Models/</tt>. That is the standard directory where the UFO will go when you press the space bar.
* Shared model, not unique to a single objects (for example a wind turbine): save it in a subdirectory of <tt>[[$FG_ROOT]]/Models/</tt>. That is the standard directory where the UFO will go when you press the space bar {{Key press|Space}}.
* Static model, unique object (like the Eiffel Tower): save it in the respective subdirectory of the Scenery folder, e.g. <tt>[[$FG_ROOT]]/Scenery/Objects/w130n30/w123n37</tt>. To browse objects anywhere on your computer, press ''l'' when using the UFO.
* Static model, unique object (like the Eiffel Tower): save it in the respective subdirectory of the Scenery folder, e.g. <tt>[[$FG_ROOT]]/Scenery/Objects/w130n30/w123n37</tt>. To browse objects anywhere on your computer, press {{key press|L}} when using the UFO.


When creating your own object, make sure it is the correct size. In [[Blender]], units are meters. Note that you should be careful about using Google Earth, due to restrictions in their license that might prevent submitting your work to the FlightGear database. See [http://flightgear.org/forums/viewtopic.php?f=5&t=3356 here] and [http://flightgear.org/forums/viewtopic.php?f=5&t=3415 here].
When creating your own object, make sure it is the correct size. In [[Blender]], units are meters. Note that you should be careful about using Google Earth, due to restrictions in their license that might prevent submitting your work to the FlightGear database. See [http://flightgear.org/forums/viewtopic.php?f=5&t=3356 here] and [http://flightgear.org/forums/viewtopic.php?f=5&t=3415 here].
Line 24: Line 24:
[[File:Placing_objects_with_UFO_html_5fa8d7b1.jpg|400px]]
[[File:Placing_objects_with_UFO_html_5fa8d7b1.jpg|400px]]


Let's say we want to position the catii-iii.xml object at the end of a taxiway. We stop the UFO just above this intersection and press the space key. A Select Model window will open up where the contents of the <tt>[[$FG_ROOT]]/Models/</tt> directory will be shown (or press "L" and you can go to any desired directory). Select your prefered model from this list, then close the window. The selected model path/name will be displayed in green text at the bottom left of the FlightGear screen.
Let's say we want to position the catii-iii.xml object at the end of a taxiway. We stop the UFO just above this intersection and press the space key. A Select Model window will open up where the contents of the <tt>[[$FG_ROOT]]/Models/</tt> directory will be shown (or press {{key press|Shift}}+{{key press|L}} and you can go to any desired directory). Select your preferred model from this list, then close the window. The selected model path/name will be displayed in green text at the bottom left of the FlightGear screen.


[[File:Placing_objects_with_UFO_html_m184fb381.jpg|400px]]
[[File:Placing_objects_with_UFO_html_m184fb381.jpg|400px]]
Line 35: Line 35:
Fly closer to the ground with the UFO, so that you can see it better.
Fly closer to the ground with the UFO, so that you can see it better.


Now press TAB (or Ctrl-I), and use the resulting sliders to adjust the latitude/longitude/elevation/heading of the model. NB: "Pitch" and "roll" will not be saved, so using them might be fun, but won't help eventually.
Now press {{key press|Tab}} (or {{key press|Ctrl}}+{{key press|I}}), and use the resulting sliders to adjust the latitude/longitude/elevation/heading of the model. NB: "Pitch" and "roll" will not be saved, so using them might be fun, but won't help eventually.


[[File:Placing_objects_with_UFO_html_439816e9.jpg|400px]]
[[File:Placing_objects_with_UFO_html_439816e9.jpg|400px]]


See the [[UFO from the 'White Project' of the UNESCO]] page for more information on the UFO command keys and exported file locations, or press ? while in FlightGear.
See the [[UFO from the 'White Project' of the UNESCO]] page for more information on the UFO command keys and exported file locations, or press {{key press|?}} while in FlightGear.


=== Deleting objects ===
=== Deleting objects ===
Line 50: Line 50:
You want to delete an object that is already saved in the corresponding .stg file and you don't know where it is:
You want to delete an object that is already saved in the corresponding .stg file and you don't know where it is:
: You don't know the filename: The model you want to delete is probably a shared model. You find it in the [http://scenemodels.flightgear.org/ scenery database]. Now you know the model's file name (e.g. [http://scenemodels.flightgear.org/modeledit.php?id=45 generic_skyscraper_01.ac] or [http://scenemodels.flightgear.org/modeledit.php?id=537 Office26x22.xml]).
: You don't know the filename: The model you want to delete is probably a shared model. You find it in the [http://scenemodels.flightgear.org/ scenery database]. Now you know the model's file name (e.g. [http://scenemodels.flightgear.org/modeledit.php?id=45 generic_skyscraper_01.ac] or [http://scenemodels.flightgear.org/modeledit.php?id=537 Office26x22.xml]).
: You still need to know where you find it. Place any model on that building and press ''d'' to know in which file you find it (see [[#Exporting the result|Exporting the result]] below). If there are several objects of that type and you want to delete only one of them, find the one closest to the coordinates of your model placed on top.
: You still need to know where you find it. Place any model on that building and press {{key press|D}} to know in which file you find it (see [[#Exporting the result|Exporting the result]] below). If there are several objects of that type and you want to delete only one of them, find the one closest to the coordinates of your model placed on top.
: Open the .stg file, delete the whole model entry (see [[#Exporting the result|Exporting the result]] below). Done.
: Open the .stg file, delete the whole model entry (see [[#Exporting the result|Exporting the result]] below). Done.


== Exporting the result ==
== Exporting the result ==
Now that the model is correctly positioned, press the ''d'' key to dump the model position data to the terminal. A few lines will be printed on the console, providing the necessary orientation data.  
Now that the model is correctly positioned, press the {{key press|D}} key to dump the model position data to the terminal. A few lines will be printed on the console, providing the necessary orientation data.  


[[File:Placing_objects_with_UFO_html_m4cf0cbf7.jpg]]
[[File:Placing_objects_with_UFO_html_m4cf0cbf7.jpg]]
Line 87: Line 87:


=== 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 {{key press|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]].


=== Loading the XML file as part of FlightGear scenery ===
=== Loading the XML file as part of FlightGear scenery ===