title: Additive Skeleton Animation
body: <p>Im having a hard time to code additive skeletal animation.</p>
  
  <p>Everything work fine if I playback each animation separately so I know that the pose of each animation is correct... What I can't figure out is how to additively blend them.</p>
  
  <p>I got the following:</p>
  
  <pre><code>void MD5ANIM_additive_blending( MD5MD5ANIM *md5, MD5MD5ANIMJOINT *dst, MD5MD5ANIMJOINT *pose0, MD5MD5ANIMJOINT *pose1 )
  {
  unsigned int i = 0;
  
  while( i != md5-&gt;n_joint )
  {
      vec3 location;
  
      quat4 quaternion;
  
      // The joints location difference
      vec3_subtract( &amp;location, &amp;pose1[ i ].location, &amp;pose0[ i ].location );
  
      // Add the joint location difference to the first pose to create additive new pose.
      vec3_add( &amp;dst[ i ].location, &amp;pose0[ i ].location, &amp;location );
  
  
      // The quaternion difference
      quat4_subtract( &amp;quaternion, &amp;pose0[ i ].quaternion, &amp;pose1[ i ].quaternion );
  
      // Add the joint quaternion difference to the first pose to create additive new pose.
      quat4_add( &amp;dst[ i ].quaternion, &amp;pose0[ i ].quaternion, &amp;quaternion );
  
      quat4_normalize( &amp;dst[ i ].quaternion,
              &amp;dst[ i ].quaternion );
  
      ++i;
  }
  }
  </code></pre>
  
  <p>Anybody can point me out where I get it wrong. From what I understand additively blending to skeleton pose is as simple as:</p>
  
  <p>additive_pose = pose0 + ( pose0 - pose1 )</p>
  
  <p>What I am doing wrong?</p>