View Single Post
Old 25th August 2009, 10:42 PM   #2
jonbourg
Junior Member
Member
 
Join Date: Aug 2009
Posts: 11
Default Re: exporting animations from AC3D into xml

Hey what a great idea!! I use FlightGear too!

Can someone write a script or make a plugin??? Here's a little more data for what we need.

1. Define animations like this:

<animation>
<object-name>something</object-name>
<type>rotate</type> <!-- I'm not sure if this is right, I think it is like that. -->
<axis>
<x1>0.130</x1>
<y1>0.149</y1>
<z1>0</z1>
<x2>0.130</x2>
<y2>-0.149</y2>
<z2>0</z2>
</axis>
</animation>


The first three x,y,z coordinates are correspondent to a vertex in an
object. The other three are the coordinates of a vertex in the opposite
side of the first one, horizontal or vertical.
2. X, Y, Z axes are exact the same in both FG and Blender in the coordinate system.

Also for some reason???
Word of caution....do note that Y and Z coordinates and swapped in FG

For the script or plugin the x,y,z coordinates are the important part the rest is up to the aircraft developer in FlightGear.

Here's a description of what the "FGFS Animation" script does for Blender:
Also if you are using blender, there is a fantastic export script (fgfs animation) that will spit out the <center> and <axis> elements. Select the item that you want to move, tab into edit mode, then select two vertices that run along a line of the axis that you want it to rotate on. Then export using rotation. This will create a text file in your home directory (on linux), then copy and paste the result into your model.xml file in the appropriate place.

Last edited by jonbourg; 25th August 2009 at 10:56 PM.
jonbourg is offline   Reply With Quote