Basics on Animation

  • Hey all,

    Are all animations done in the Graphics section?

    I didnt have a dynamics section at first, so I brought in the Extra 330 TMD and converted it to my plane. I then deleted the graphics section, added my single rigid graphics section with parts list, then deleted the rudder from the list and added it into a animation block. Presently I cannot get the sim to start now. My TMD is really messed up and I am trying to get it all going. Nothing is working... sigh..

    When I had the basic 'Template' TMD, I tried installing a rudder animation block, but that didnt work. I am guessing because it didnt have a Dynamics section.

    Do I need a rudder in the Dynamics section? Do I need to list a servo that will power the rudder, then have the rudder graphics block with the animations in it?


    Many thanks.


    Bill

  • When ever you run into troubles with the sim not starting check the tm.log file "C:\Users\...\Documents\Aerofly FS 2\tm.log", scroll all the way to the bottom and then back up until you see where your aircraft is being loaded. "loading dynamics begin '[...]xyz.tmd'..."

    Then for your issue: I'd just delete the rudder animation again. See if you can start the sim again with your aircraft. Then copy-paste the hingedbodygraphics from the rudder in the extra:

    Code
    <[string8][object][hingedbodygraphics]
                <[string8][Name][Rudder]>
                <[uint32][PositionID][Fuselage.R]>
                <[uint32][OrientationID][Fuselage.Q]>
                <[string8][GeometryList][ Rudder ]>
                <[uint32][AngleID]  [ServoRudder.Output]>
                <[tmvector3d][Axis] [ 0.0 0.0 1.0 ]>
                <[tmvector3d][Pivot][ -4.2282 0.0 0.52 ]>
            >

    Then rename the 3D object name if it is not called "Rudder" in your model. Then test that in the sim.
    > Your rudder should move all over the place now.

    Then change the Axis and Pivot (you can probably get them from the exporter log file), save the file and reload the airplane. FYI: You can bind a key for the quick reload function (in control settings) then you don't have to restart the sim and reload the scenery every time.
    > now your rudder should rotate correctly. If it rotates the wrong way check that it works in the correct physical way (if not invert rudder servo R1 parameter) then multiply each value of the Axis by -1.0 to let it rotate the other way around. (You could also change the sign of AngleMax.)

    Good luck,
    Jan

  • Thanks to Jan for walking me through this.

    I was missing a servo assignment, which is copied out from another plane into the TMD. My starter TMD was the Template which has no dynamics or servo assignments and no animations, which I knew, but didnt know about the servo section.

    This is my rudder animation block, which goes below the primary parts block and in the 'graphics' section. (Graphics is the polygon structures with graphics on them).


    Animation block;


    The next code goes above this, below Dynamics, above Graphics;


    For those that are animating, you refer to your TM.log that exports with your aircraft model from 3DS Max or other 3D program. ON that log is a list of parts blocks. It has the Gizmo location and its angle, then it has three swivel angles. Your part will animate on one of those axis swivel angles. In AF2, the last one is used in the game engine, so if your rudder is moving on the wrong axis, you change to the next swivel axis, etc.

    Below is the block for the rudder from the TM log, how it looks, un-edited...

    ** Note above, the TM log part block has the servo as [ServoRightAileron.Position]. That is changed to ServoRudder.
    ** Note also, the top string on that block says its a [hingedbodygraphics]. In this case, that is the proper animation type, so that is not edited.


    Above, you see the three Axis (stack) are;

    0.61-export: <[tmvector3f][Axis][ -0.9962 -0.0000 0.0872 ]>
    0.61-export: <[tmvector3f][Axis][ 0.0872 0.0000 0.9962 ]>
    0.61-export: <[tmvector3f][Axis][ -0.0000 1.0000 0.0000 ]>

    So you could copy this block (above) and edit it to look proper, or you could copy/paste one from another plane (like the Robin, Cessna, etc) and paste it into your TMD, then edit it. Copy in the Axis strings (3) and the Pivot (Gizmo). Change the name of your model part (mine is RudderBullette), then save and check in Aerofly. If the rudder animates on the wrong axis, flip the stack for the next axis. Repeat test. Flip stack again for 3rd choice if needed.

    Done... You now have a animated rudder. The missing component for me was the Servo control section.


    You can run 'searches' for your parts concerning the Servo names.

    Note also, in my case, that the animation block in the TM.log is given a common Servo name and animation name. Those will probably change to something else. There are several types of 'Graphics' names and Servo names. In my case, with the rudder, I am using [hingedbodygraphics], and its Servo is ServoRudder.

    There are downloadable lists in the new Wiki where you can copy out the names of the parts you need, and they are in similar plane's 'TMD' files also.

    Hope that helps people out.


    Bill
    LHC