XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

blending or lerping between two animation states

Last post 2/9/2010 11:56 PM by jwatte. 2 replies.
  • 2/9/2010 8:26 PM

    blending or lerping between two animation states

    I am wondering how to attempt to lerp or blend together two animation states of a 3d model.  moving from idle to running is really ugly.
  • 2/9/2010 9:57 PM In reply to

    Re: blending or lerping between two animation states

  • 2/9/2010 11:56 PM In reply to

    Re: blending or lerping between two animation states

    The kW Animation library does this; you could download the source code as an example.

    In general, you run both animations in parallel, and lerp between the first and second animation over time. (Lerping translations, quaternions and scales separately). Remember to lerp quaternions the "short way round" and to normalize after lerping. Note that matrix lerping is a bad idea, because it is not volume conserving.

    Also, if you go from walk to run, make sure to play both animations at the same phase, so that the right-foot-forward bits blend together. This means you have to pay some attention to stride length and animation speed when creating the animations, too.

    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG