Board index FlightGear Development Aircraft

Can FlightGear aircraft handle hierchical animation?

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Can FlightGear aircraft handle hierchical animation?

Postby MDaniels3001 » Thu Nov 30, 2006 1:48 am

Hello,

I have been challenged to create a Flight gear aircraft that has a folding wing. This would require some hierarchy on the parts of the wing that move along with the main wing structure when it moves. Like having ailerons on a Corsair...

Can this be set up in the model export? Will PLIB retain the hierarchy information? And will the axis of rotations for the parts work since the center of the wing 'parts' is no longer the center of the aircraft, be the center of the parent wing part...?

Also, what needs to change in the XML file for the model to have the hierarchical animation, and how do you add a 'fold wing' control to the flight model?

Anyone ?? Anyone???
MDaniels3001
 
Posts: 12
Joined: Thu Nov 30, 2006 1:36 am
Location: Alexandria, VA

Can FlightGear aircraft handle hierchical animation?

Postby Dene » Thu Nov 30, 2006 2:06 am

In my experience, the sort of thing you want to do is done entirely in the xml file. The object in the model is selected and the axis of rotation is specified then the movement of the various objects in the model are tied into the property tree. The hierchical aspect can be achieved if the property it is tied into is continuously variable rather than boolean by using different "trigger" points. ie if the variable can take all values between 0 and 1 then the first object might start moving at a value of 0.1 while objects that are to move later, won't start moving until the property reaches a value of 0.5. This is how flap animations are done.
Cheers
Dene Maxwell
NZWN
Dene
 
Posts: 9
Joined: Wed Nov 29, 2006 5:58 am
Location: Wellington, New Zealand
Version: 200
OS: OpenSuSe

Re: Can FlightGear aircraft handle hierchical animation?

Postby curt » Thu Nov 30, 2006 5:42 am

Dene wrote:In my experience, the sort of thing you want to do is done entirely in the xml file.


There are existing aircraft that implement folding wings so if you hunt through the navy planes, you could probably find one and look at the xml model animation file and see how it's done.

Curt.
curt
Administrator
 
Posts: 1167
Joined: Thu Jan 01, 1970 12:00 am
Location: Minneapolis, MN

Well, it appears PLIB hangs when you try to import a model w

Postby MDaniels3001 » Thu Nov 30, 2006 4:03 pm

Well, it appears PLIB hangs when you try to import a model with hierarchy...too bad...would've made things so much easier. It sees the 'folder' nodes as blank nonexistant geometry and doesn't like it.

Okay, will check the downloads for a NAVY plane with folding wing features...Hopefully someone will have one with folding wings with ailerons on a larger wing that folds up (like the Naval basad Corsair)

- Mark
MDaniels3001
 
Posts: 12
Joined: Thu Nov 30, 2006 1:36 am
Location: Alexandria, VA

Where does one find these 'Navy Planes'?

Postby MDaniels3001 » Fri Dec 01, 2006 6:13 pm

I have checked FG's aircraft library and there is a F-4, but it doesn't have folding wings, and I checked AVSIMs libray...not much there either...

Know of any place?

Thanks -
Mark
MDaniels3001
 
Posts: 12
Joined: Thu Nov 30, 2006 1:36 am
Location: Alexandria, VA

Postby Flying toaster » Fri Dec 01, 2006 7:05 pm

Check out the seafire on main site. I think it has folding wings ;)
Flying toaster
 
Posts: 348
Joined: Wed Nov 29, 2006 6:25 am
Location: Toulouse France

Re: Can FlightGear aircraft handle hierchical animation?

Postby DFaber » Sat Dec 02, 2006 9:55 am

MDaniels3001 wrote:This would require some hierarchy on the parts of the wing that move along with the main wing structure when it moves. Like having ailerons on a Corsair...


You can put multiple objects in one <rotate> animation (like a wing, flap and aileron that rotate around the wingfold hinge) The Aileron and flap can have their own animation and will still fold up with the wing and work correct.
Have a look at the F4U Gear animation. The Gear parts and wheel use the same <rotate> animation for folding backwards while the wheel and gearleg does an additional 90 degree swing.

Greetings

Detlef

PS: The wing fold is on my todo list for the F4U.
DFaber
 
Posts: 687
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Oh yeah...so the transform matrices just multiply depending

Postby MDaniels3001 » Wed Dec 13, 2006 5:21 pm

Oh yeah...so the transform matrices just multiply depending on how many animation rotation nodes you have in the .xml file. That works...

so you have 2 animation nodes. One for the 'parent' object that references the child object and rotates about the parents center and axis...

<animation>
<part1>
<part1Child>
<center>
</center>
<axis>
</axis>
</animation>

and then another animation node for just the child part...usings the parts center and axis...

<animation>
<part1Child>
<center>
</center>
<axis>
</axis>
</animation>

Guess that isn't so hard. Note...I also found if you created a /model node that references another .xml file you could achieve the same thing. The downside to this is that your 'preview' model in the FlightGear startup won't have the sub-parts showing...

- Mark


and it has its own center
MDaniels3001
 
Posts: 12
Joined: Thu Nov 30, 2006 1:36 am
Location: Alexandria, VA


Return to Aircraft

Who is online

Users browsing this forum: sidi762 and 3 guests