Jump to content
Sign in to follow this  
Varmint007

Elevator Animation Based on Hydraulic Pressure SOLVED!

Recommended Posts

Rather than bury this in the other thread, I thought I'd describe the entire process here.Thanks go to Lou "Firestriker" for providing the idea and the hints needed, as well as a "test model" which provided the needed heirarchy already set up. His XML code worked, but didn't work as well as I'd hoped. After a lot of T&E, I have finally managed to crack this particular nut.This is the parts heirarchy:The "dummy nodes" are tiny cubes that're hidden within the elevator(s) and have their pivots set for the correct axis of rotation. IMPORTANT NOTE: these MUST be real geometry! You cannot use GMax "dummy nodes" that have no geometry, otherwise the animation is stripped out during the compile!The two nodes control visibility.The node is key-frame animated using 200 frames, and positionally rotated based on the relative hydraulic pressure.l_elevator and elevator_drooped are the visible parts and are identical twins... :) Because is linked to the parent , it will 'rotate' along with the parent. l_elevator will of course simply respond to the "FS stock animation."I suppose that I should also go nuts and similarly animate the ailerons, and VC yoke as well.Of course, as one of my colleagues pointed out, some a/c have control locks to prevent the control surfaces from moving, so this needs to be researched for accuracy!But, since I've now got the correct code entered into the xml_parts file, I'll never have to spend time working it out again, but simply remember to use the correct "part names!" :)Now we get to the real "MEAT" of the process, the dreaded XML code in the makemdl.parts.xml file: ac_cond_eng_slow(A:GENERAL ENG PCT MAX RPM:1, percent) 25ac_cond_eng_fast(A:GENERAL ENG PCT MAX RPM:1, percent) 25elevator_droopENG1 HYDRAULIC PRESSUREpsi2600The first two are the controllers for visibility. The third entry is the 'heart' of the process, since it will slowly cause the elevator to rise to 'flight normal position' then politely disappear once the engine starts. The rise is approximately 6 seconds, based on 200 key-frames of animation.On engine shutdown, the hydraulic pressure slowly bleeds off, and the elevator takes about 30 seconds to completely 'droop' to its lowest position.Also, the code for hydraulic pressure is based on a max value of 3,000 as entered in the aircraft.cfg file, so may need adjusting based on your a/c's actual .cfg entry.As Finn N. would say, "All in good fun!" :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Bill,Awesome, grats on getting that working. I'm sure many of us can benefit from using similar techniques in our own projects.I myself have yet to begin doing any parts animation, so any examples are good examples:)--Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...