Howto:3D Aircraft Models: Difference between revisions

Jump to navigation Jump to search
Fix some syntax errors, and wiki markup.
No edit summary
(Fix some syntax errors, and wiki markup.)
Line 61: Line 61:
  </PropertyList>
  </PropertyList>


== Repositioning the Model ==
== Repositioning 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.
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.


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:
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:


'''/offsets/x-m''' <br />
*'''/offsets/x-m'''
The distance to reposition the model along the x-axis. <br />
:The distance to reposition the model along the x-axis.
'''/offsets/y-m''' <br />
*'''/offsets/y-m'''
The distance to reposition the model along the y-axis. <br />
:The distance to reposition the model along the y-axis.
'''/offsets/z-m''' <br />
*'''/offsets/z-m'''
The distance to reposition the model along the z-axis. <br />
:The distance to reposition the model along the z-axis.
'''/offsets/heading-deg'''<br />
*'''/offsets/heading-deg'''
The angle by which to rotate the model around the z-axis. <br />
:The angle by which to rotate the model around the z-axis.
'''/offsets/roll-deg''' <br />
*'''/offsets/roll-deg'''
The angle by which to rotate the model around the x-axis. <br />
:The angle by which to rotate the model around the x-axis.
'''/offsets/pitch-deg''' <br />
*'''/offsets/pitch-deg'''
The angle by which to rotate the model around the y-axis. <br />
:The angle by which to rotate the model around the y-axis.
 
For example, if you wanted to use the 3D model my-cessna.ac but found that the nose was pointing to the right instead of straight-ahead and the wheels were 1.5 metres off the ground, you could reorient it in the XML wrapper file like this:
For example, if you wanted to use the 3D model my-cessna.ac but found that the nose was pointing to the right instead of straight-ahead and the wheels were 1.5 metres off the ground, you could reorient it in the XML wrapper file like this:


Line 94: Line 95:
It usually takes a bit of experimentation to get the model positioned correctly. Also note that if your values are zero the offsets do not have to be included. All are demonstrated above to show the format.
It usually takes a bit of experimentation to get the model positioned correctly. Also note that if your values are zero the offsets do not have to be included. All are demonstrated above to show the format.


== Animating the Model ==
== Animating the model ==
{{Mergeto|Howto:Animate models}}
{{Main article|Howto: Animate models‎‎}}
{{Main article|Howto: Animate models‎‎}}


Line 100: Line 102:


Currently, there are four types of animation recognized:  
Currently, there are four types of animation recognized:  
 
* none  
    * none  
* spin  
    * spin  
* rotate
    * rotate
* translate  
    * translate  


These  are sufficient for animating the main control surfaces of many standard-configuration aircraft. none is a no-op; spin rotates the object around an axis with a known rotational velocity (not worrying about the exact position),  rotate rotates the object around an axis to an exact position and translate moves an object along an axis.  
These  are sufficient for animating the main control surfaces of many standard-configuration aircraft. none is a no-op; spin rotates the object around an axis with a known rotational velocity (not worrying about the exact position),  rotate rotates the object around an axis to an exact position and translate moves an object along an axis.  
Line 111: Line 112:


  <animation>
  <animation>
<type>rotation</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
  </animation>
  </animation>


Line 118: Line 119:


  <animation>
  <animation>
<type>rotation</type>
  <type>rotate</type>
<object-name>LeftElevator</object-name>
  <object-name>LeftElevator</object-name>
<object-name>RightElevator</object-name>
  <object-name>RightElevator</object-name>
  </animation>
  </animation>


Line 126: Line 127:


  <animation>
  <animation>
<type>rotation</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
<property>controls/rudder</property>
  <property>controls/rudder</property>
  </animation>
  </animation>


Line 136: Line 137:


  <animation>
  <animation>
<type>rotation</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
<property>controls/rudder</property>
  <property>controls/rudder</property>
<factor>18</factor>
  <factor>18</factor>
  </animation>
  </animation>


Line 147: Line 148:


  <animation>
  <animation>
<type>rotation</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
<property>controls/rudder</property>
  <property>controls/rudder</property>
<offset>-0.01</offset>
  <offset>-0.01</offset>
<factor>18</factor>
  <factor>18</factor>
  </animation>
  </animation>


Line 160: Line 161:
  <nowiki>
  <nowiki>
  <animation>
  <animation>
<type>rotate</type>
  <type>rotate</type>
<object-name>NoseWheel</object-name>
  <object-name>NoseWheel</object-name>
<property>gear/gear[0]/position-norm</property>
  <property>gear/gear[0]/position-norm</property>
<factor>120</factor>
  <factor>120</factor>
<offset>-1</offset>
  <offset>-1</offset>
<min>-90</min>
  <min>-90</min>
<max>0</max>
  <max>0</max>
<center>
  <center>
  <x-m>-2.28</x-m>
    <x-m>-2.28</x-m>
  <y-m>0.0</y-m>
    <y-m>0.0</y-m>
  <z-m>-0.65</z-m>
    <z-m>-0.65</z-m>
</center>
  </center>
<axis>
  <axis>
  <x>0</x>
    <x>0</x>
  <y>1</y>
    <y>1</y>
  <z>0</z>
    <z>0</z>
</axis>
  </axis>
  </animation>
  </animation>
  </nowiki>
  </nowiki>
Line 192: Line 193:
  <nowiki>
  <nowiki>
  <animation>
  <animation>
<type>rotate</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
<property>controls/rudder</property>
  <property>controls/rudder</property>
<factor>18</factor>
  <factor>18</factor>
<center>
  <center>
  <x-m>5.45</x-m>
    <x-m>5.45</x-m>
  <y-m>0.0</y-m>
    <y-m>0.0</y-m>
  <z-m>0.0</z-m>
    <z-m>0.0</z-m>
</center>
  </center>
  </animation>
  </animation>
  </nowiki>
  </nowiki>
Line 209: Line 210:


  <axis>
  <axis>
<x>0</x>
  <x>0</x>
<y>0</y>
  <y>0</y>
<z>1</z>
  <z>1</z>
  </axis>
  </axis>


Line 217: Line 218:


  <axis>
  <axis>
<x>0</x>
  <x>0</x>
<y>0</y>
  <y>0</y>
<z>1000000</z>
  <z>1000000</z>
  </axis>
  </axis>


Line 225: Line 226:


  <axis>
  <axis>
<x>0.05</x>
  <x>0.05</x>
<y>0</y>
  <y>0</y>
<z>1</z>
  <z>1</z>
  </axis>
  </axis>


Line 233: Line 234:


  <axis>
  <axis>
<x>1</x>
  <x>1</x>
<y>0</y>
  <y>0</y>
<z>20</z>
  <z>20</z>
  </axis>
  </axis>


Line 241: Line 242:


  <axis>
  <axis>
<x>0.15</x>
  <x>0.15</x>
<y>1.00</y>
  <y>1.00</y>
<z>0.01</z>
  <z>0.01</z>
  </axis>
  </axis>


Line 250: Line 251:
  <nowiki>
  <nowiki>
  <animation>
  <animation>
<type>rotate</type>
  <type>rotate</type>
<object-name>Rudder</object-name>
  <object-name>Rudder</object-name>
<property>controls/rudder</property>
  <property>controls/rudder</property>
<factor>18</factor>
  <factor>18</factor>
<center>
  <center>
  <x-m>5.45</x-m>
    <x-m>5.45</x-m>
  <y-m>0.0</y-m>
    <y-m>0.0</y-m>
  <z-m>0.0</z-m>
    <z-m>0.0</z-m>
</center>
  </center>
<axis>
  <axis>
  <x>0.72</x>
    <x>0.72</x>
  <y>0.0</y>
    <y>0.0</y>
  <z>1.0</z>
    <z>1.0</z>
</axis>
  </axis>
  </animation>
  </animation>
  </nowiki>
  </nowiki>
Line 271: Line 272:
  <nowiki>
  <nowiki>
  <animation>
  <animation>
<type>spin</type>
  <type>spin</type>
<object-name>Propeller</object-name>
  <object-name>Propeller</object-name>
<property>engines/engine[0]/rpm</property>
  <property>engines/engine[0]/rpm</property>
<center>
  <center>
  <x-m>0</x-m>
    <x-m>0</x-m>
  <y-m>0</y-m>
    <y-m>0</y-m>
  <z-m>-.25</z-m>
    <z-m>-.25</z-m>
</center>
  </center>
<axis>
  <axis>
  <x>1.0</x>
    <x>1.0</x>
  <y>0.0</y>
    <y>0.0</y>
  <z>0.0</z>
    <z>0.0</z>
</axis>
  </axis>
  </animation>
  </animation>
  </nowiki>
  </nowiki>
Line 357: Line 358:
{{3d}}
{{3d}}


[[Category:Howto|3D Aircraft Models]]
[[Category:Howto]]
[[Category:Modeling]]
[[Category:Modeling]]
[[fr:Modélisation avion]]
[[fr:Modélisation avion]]

Navigation menu