# animation blending

**URL:** https://forums.imgtec.com/t/animation-blending/592
**Category:** PowerVR Insider
**Created:** [January 25, 2010, 5:58am UTC](https://forums.imgtec.com/t/animation-blending/592 "2010-01-25T05:58:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dbtex35](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dbtex35](https://forums.imgtec.com/u/dbtex35)
#### Post date: [January 25, 2010, 5:58am UTC](https://forums.imgtec.com/t/animation-blending/592/1 "2010-01-25T05:58:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)
#### Post date: [January 26, 2010, 4:56pm UTC](https://forums.imgtec.com/t/animation-blending/592/2 "2010-01-26T16:56:43Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![dbtex35](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dbtex35](https://forums.imgtec.com/u/dbtex35)
#### Post date: [January 26, 2010, 7:42pm UTC](https://forums.imgtec.com/t/animation-blending/592/3 "2010-01-26T19:42:03Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)
#### Post date: [January 26, 2010, 8:31pm UTC](https://forums.imgtec.com/t/animation-blending/592/4 "2010-01-26T20:31:17Z")

</div>

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.
