Menu

Animation Export Problem

ghoffmann
2007-10-23
2013-05-28
  • ghoffmann

    ghoffmann - 2007-10-23

    I'm still having problems exporting an animation consisting of a translation and a rotation component. If someone could point me in the right direction that would be great.
    Below is a code snippet:

    //first I create a new track which consists of a a position array of length 2. This works fine by itself
        pMotionResource->AddTrack(&trackName, &trackID);
            pMotionResource->ClearTrack(trackID);
            pMotionResource->InsertKeyFrames(trackID, 2, u3dkeyFrameArray);

    //second I create another rotational track (with some dummy data). Commenting out either the code above or the code //below results in a correctly  exported single animation. Both combined however result in nothing getting exported.

            float tm[16] = {1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1};
            float tm2[16] = {1,0.2,0.4,0,0,1,0,0,0,0,1,0,0,0,0,1};
            IFXMatrix4x4 mul_u3d_matrix(tm);
            IFXMatrix4x4 mul_u3d_matrix2(tm2);
             IFXQuaternion final_u3dRotation0(mul_u3d_matrix);
             IFXQuaternion final_u3dRotation1(mul_u3d_matrix2);

            IFXKeyFrame* u3dkeyFrameArray2 = 0;
            u3dkeyFrameArray2 = new IFXKeyFrame[2];
            u3dkeyFrameArray2[0].SetTime(0);
            u3dkeyFrameArray2[0].Rotation() = final_u3dRotation0;
            u3dkeyFrameArray2[1].SetTime(20);
            u3dkeyFrameArray2[1].Rotation() = final_u3dRotation1;

            pMotionResource->AddTrack(&trackName2, &trackID);
            pMotionResource->ClearTrack(trackID);
            pMotionResource->InsertKeyFrames(trackID, 2, u3dkeyFrameArray2);
            

     
    • ghoffmann

      ghoffmann - 2007-10-25

      Let me clarify that what I want is to have a piece of geometry with a translation and rotation component which is independent of each-other meaning that they have completely different time values and numbers of keyframes.

       
    • ghoffmann

      ghoffmann - 2007-11-01

      So my conclusion after diving deeper into the animation functionality of U3D is that it is simply not possible to have a set of rotational keyframes and a (different length) set of translation keyframes on the same object. That leaves as the only solution for such a case to do a sampling of the original animation.

       
    • Timothy Strelchun

      Here's a message I sent in response to your 10/25 message
      that I hadn't realized wasn't received...

      >Let me clarify that what I want is to have a piece of
      >geometry with a translation and rotation component which
      > is independent of each-other meaning that they have
      > completely different time values and numbers of
      > keyframes.

      As I recall, with the CID_IFXAnimationModifier modifier only
      the complete transform can be animated.  I checked my old
      distribution and found that mentioned in the doxygen usage
      description of the various modifiers (Main Components page).

      So, I would try creating two animation modifiers, one for
      the translation and another for the rotation and adding
      both to the model notes modifier chain.

      --------------

      ...and here's the new message I was going to send in response
      to your latest posting that I wrote BEFORE not realizing that
      you hadn't seen my previous message (I mistakenly sent it to
      noreply@sourceforge.net).

      >So my conclusion after diving deeper into the animation
      >functionality of U3D is that it is simply not possible to
      >have a set of rotational keyframes and a (different
      > length) set of translation keyframes on the same object.

      If you've tried the approach of using two animation modifiers,
      then I expect it's a limitation of the sample software's
      animation modifier implementation only and not the file
      format.  Thoughts?

      Regards,
      Timothy

      --

      Timothy Strelchun
      CE Software Engineering
      Digital Home Group
      Intel Corporation

      The views expressed above are my own and not those of Intel

       
    • ghoffmann

      ghoffmann - 2007-11-06

      Thanks for your reply.

      Yes. I have tried using two modifiers but the result was that no animation was showing up in the viewer that I'm using (Adobe 3d Toolkit) at all despite the fact that according to the log file the two modifiers were exported correctly. The question is also if two modifiers on one object would be allowed how to indicate to the toolkit that one is for rotation and the other is for translation only given that the first and last keyframe have absolute values.

       
    • Guysh

      Guysh - 2008-11-12

      Hallo all

      Was someone able to go over this problem with exporting to different tracks?

      or does the only way I can divide my animation to different steps is by the time intervals?
      ( as I've seen in examples by Right Hemisphere)

      what I need is a way to divide two actions taking place in the same time to two different steps in the pdf

      any thoughts about it?

      thanks guy

       

Log in to post a comment.