animation blending

This topic contains 3 replies, has 2 voices, and was last updated by  warmi 7 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30039

    dbtex35
    Member

    I’m using the OglesSkinning example. I want to create an animation blending for my idle, walk, run transitions but I’m having trouble on how I should go about accomplishing this. Should I use GetTranslationMatrix function to generate a world matrix that is linear interpolated and use it to transform the bones. Any ideas would appreciated.

    Thanks

    #33689

    warmi
    Member

    I do in my own code… in other words, I don’t use CPVRTModelPOD::GetBoneWorldMatrix or any of that . While using CPVRTModelPOD is a decent and quick way to play basic skeletal animations it is not well suited for optimized skeletal animation blending.

    If you want to blend multiple animations , the best way is to interpolate basic animation frames ( Vector3 and Quaternion data) before you convert that to the matrix form.

    Personally I use my own Skeleton/Animation classes which read basic POD animation frames and interpolate Quat and Vector3 data from multiple POD files … later on I use the final interpolated Vector3/Quat frame to update the skeleton only once (top > bottom as opposed to less efficient bottom -> up the way CPVRTModelPOD does)

    #33690

    dbtex35
    Member

    Hi warmi

    How are you able to get vector and Quaternion data based on the animation frame. I was looking at GetWorldMatrixNoCache and node.pfAnimMatrix is set. I never get the opportunity to use GetTranslationMatrix, GetScalingMatrix, and GetRotationMatrix. In each case, node.pfAnimPosition, node.pfAnimScaling, and node.pfAnimRotation pointers are null. All information are stored in a transformation matrix for each animation frame (node.pfAnimMatrix). Is there a setting in the exporter that I am not enabling. It would be nice to use the MatrixVec3Lerp and MatrixQuaternionSlerp that are already written.

    #33691

    warmi
    Member

    My code rejects POD files which use node.pfAnimMatrix for animations and coupled with the fact that I using my own exporter which always creates Vector3/Quat data , I don’t really have any problems with that.

    Frankly, since I don’t use any of the official exporters, I can’t really say, but I have yet to see a POD file ( mainly talking about POD files included with the SDK) that uses node.pfAnimMatrix.

    Ps.

    Perhaps unchecking “Export Matrices” would do the trick.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.