8,827
edits
mNo edit summary |
(+ Models/ directory, link fixes, models are not limited to .ac) |
||
| Line 1: | Line 1: | ||
{{WIP}} | {{WIP}} | ||
There are many things required to develop an [[aircraft]] for [[FlightGear]]. We encourage new developers to start their 'career' by modifying and enhancing existing aircraft. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself. | There are many things required to develop an [[aircraft]] for [[FlightGear]]. We encourage new [[Portal:Developer|developers]] to start their 'career' by modifying and enhancing existing aircraft. It is much easier to do and gives you a giant advantage by the time you create an aircraft completely by yourself. | ||
The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes. | The content in this article gives a summary of codes and can be found on most planes. So, for examples on how it's used, you can take a look at some random planes. | ||
| Line 8: | Line 7: | ||
==Before you start== | ==Before you start== | ||
An aircraft in FlightGear has two main development areas: | An aircraft in FlightGear has two main development areas: | ||
# The '''[[Flight Dynamics Model|Flight Dynamics Model (FDM) | # The '''[[Flight Dynamics Model|Flight Dynamics Model]] (FDM)''': This tells the computer how your aircraft reacts to various conditions. The FDM is composed of two main models most people use, either [[JSBSim]] or [[YASim]]. Or the lesser used model [[UIUC]]. They specify how the aircraft reacts based on aerodynamic data and facts such as wind, terrain and control inputs. You need to supply and specify these parameters in order to model your aircrafts flight characteristics as close to reality as possible, the more parameters the better. A subarea of the FDM are integral systems like the [[autopilot]] and fuel systems. | ||
# The '''appearence''' of the aircraft, which can be split in two ares: | # The '''appearence''' of the aircraft, which can be split in two ares: | ||
## 3-dimensional model | ## 3-dimensional model and all of its visual aspects, animations, [[Howto: Add aircraft lights|lighting]] and textures. | ||
## auditory (sounds). | |||
All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Since FlightGear 1.9, images no longer have to be saved in the .rgb format. Right now .png is most common used among FlightGear developers. | All images in FlightGear should be sized to powers of two (eg. 64*64, 128*256 or 16*1024). Since FlightGear 1.9, images no longer have to be saved in the .rgb format. Right now .png is most common used among FlightGear developers. | ||
| Line 84: | Line 83: | ||
====<autopilot><path></path></autopilot>==== | ====<autopilot><path></path></autopilot>==== | ||
Where to find the [[autopilot]] system. | Where to find the [[autopilot]] system. | ||
===Models/ directory=== | |||
This directory contains all model related files; such as textures, models and animation files (.xml). In the -set.xml file we've set the path to one .xml file. That file should link (indirect) to each other model file (including a possible 3D cockpit) needed for the plane. The whole plane could be modeled into one file, but most developers prefer to split things up. A cockpit for example can be built up by several files, each existing of just one [[Creating instruments for FG|instruments]] or panel. This way it is easy to (re)move certain parts of the aircraft. You set up your model file like this: | |||
<pre> | |||
<PropertyList> | |||
<path>Aircraft.ac</path> | |||
<model> | |||
<name>Cockpit</name> | |||
<path>Aircraft/.../Models/cockpit.xml</path> | |||
<offsets> | |||
<x-m> -5.25</x-m> | |||
<y-m> 0.00</y-m> | |||
<z-m> 1.30</z-m> | |||
</offsets> | |||
</model> | |||
<animation> | |||
<type>rotate</type> | |||
<object-name>AileronLeft</object-name> | |||
<property>/controls/flight/aileron</property> | |||
<factor>-65</factor> | |||
<center> | |||
<x-m> 2.09</x-m> | |||
<y-m>-5.50</y-m> | |||
<z-m>-1.50</z-m> | |||
</center> | |||
<axis> | |||
<x>1</x> | |||
<y>0</y> | |||
<z>0</z> | |||
</axis> | |||
</animation> | |||
</PropertyList> | |||
</pre> | |||
The cockpit.xml file can contain a similair structure, with all the instruments as seperate models. The amount of models is not limited, so is the amount of animations. | |||
A detailed article about animating and models can be found in [[Howto: 3D Aircraft Models]]. | |||
A common subdirectory is the Liveries/ one, which holds the livery files. See [[Livery over MP]] for more information about that subject. | |||
==Extra codes== | ==Extra codes== | ||