What is the essence of animation blending in D3?

Started by bitterman, December 13, 2017, 10:53:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bitterman

E.g. I typed 'testmodel char_betruger'.

Model has got few anims, e.g. walk and idle.

When I try to blend these anims with 'testBlend walk idle 15' it's not working (I don't see any blending).

How can I get some example with animation blending with this or other model?

In what cases need I use it? Any examples?

Thanks.




bitterman

Looks like this command must play both anims in one time (line 615, 616). But it don't. Hmmm...

Quote=====================
  590 idTestModel::BlendAnim
  591 =====================
  592 */
  593 void idTestModel::BlendAnim( const idCmdArgs &args ) {
  594         int anim1;
  595         int anim2;
  596
  597         if ( args.Argc() < 4 ) {
  598                 gameLocal.Printf( "usage: testblend <anim1> <anim2> <frames>\n" );
  599                 return;
  600         }
  601
  602         anim1 = gameLocal.testmodel->animator.GetAnim( args.Argv( 1 ) );
  603         if ( !anim1 ) {
  604                 gameLocal.Printf( "Animation '%s' not found.\n", args.Argv( 1 ) );
  605                 return;
  606         }
  607
  608         anim2 = gameLocal.testmodel->animator.GetAnim( args.Argv( 2 ) );
  609         if ( !anim2 ) {
  610                 gameLocal.Printf( "Animation '%s' not found.\n", args.Argv( 2 ) );
  611                 return;
  612         }
  613
  614         animname = args.Argv( 2 );
  615         animator.CycleAnim( ANIMCHANNEL_ALL, anim1, gameLocal.time, 0 );
  616         animator.CycleAnim( ANIMCHANNEL_ALL, anim2, gameLocal.time, FRAME2MS( atoi( args.Argv( 3 ) ) ) );
  617
  618         anim = anim2;
  619         headAnim = 0;
  620 }
  621
  622 /***********************************************************************

bitterman


The Happy Friar

cool.  never messed with the testblend command.  So does it work now?

bitterman

#4
Yes, just try these console commans after ' testModel'.

As I undetstand it the anim blend used in D3 to create a smooth transition between anims with different starting poses.