The distance to reposition the model along the z-axis. The distance to reposition the model along the y-axis. The distance to reposition the model along the x-axis. Inside the XML wrapper file (not the main FlightGear property tree), there are six properties that allow you to tweak the default position and orientation of the model: Often, an aircraft model not designed specifically for FlightGear will not be positioned or oriented correctly for example, it might be too far off the ground, and the nose might point to the side or even straight up. Usually, you should put the wrapper file in the same directory as the 3D file, and then have /sim/model/path point to the wrapper file, either on the command lineįgfs -prop:/sim/model/path=Models/my-cessna.xml The following sections will explain how to add repositioning and animation information to the file for now, the only property to worry about is path: it provides the relative path to the actual 3D file from the XML wrapper file (not from FG_ROOT!). Like the -set.xml files, this file is in XML property list format, but the properties in it are not added to the main FlightGear property tree they're used only while loading the model. Here's a simple example of a 3D-model wrapper file, with no repositioning or animation information: So far, all of the examples have had the /sim/model/path property point directly at the 3D model file (Models/my-cessna.ac) however, if you want to be able to reposition or animate the model, you need to point to an intermediate XML file instead, and then put the repositioning and animation information into the XML file. for any single aircraft type, so you are best off copying an existing one, renaming it, then changing the value inside the path element inside model inside sim: There may be many XML files with different startup conditions, sounds, panels, 3D models, etc. These files are in the same XML property-list format as $FG_ROOT/preferences.xml and the FlightGear save files. Loads the properties from $FG_ROOT/Aircraft/dc3-yasim-set.xml into the main FlightGear property tree. When you start FlightGear with the -aircraft option, it reads the properties from one of these files for example In the $FG_ROOT/Aircraft/ directory there is a series of files ending in -set.xml, such as c172-set.xml, dc3-yasim-set.xml, and beech99-uiuc-set.xml. When you want to set a 3D model permanently as the default for an aircraft rather than specifying it on the command line, you need to edit an aircraft settings file. It is howerever possible to specify a path (relative to the model path) to specify where the textures could be found.) If my-cessna.ac uses the textures cessna01.rgb and cessna02.rgb, you should also install those textures in $FG_ROOT/Models/. (Note: Normally all textures used by the model must appear in the same directory. The easiest way to load a new model is to set the property at startup with the -prop: command line option for example, to use a 3D aircraft model that you have installed in $FG_ROOT/Models/my-cessna.ac, you could invoke FlightGear like this (under Unix-like systems):įgfs -prop:/sim/model/path=Models/my-cessna.ac The property /sim/model/path in the main FlightGear property tree controls what model will be loaded it takes a string value giving the relative path of the model from $FG ROOT. ac is the standard used in most FG models. Through OpenSceneGraph, FlightGear supports many different 3D file formats, including VRML1, AC3D, DXF, and many others.
0 Comments
Leave a Reply. |