Game Development Community

[opinion] Complete split Upper body Animation, Lower body Animation (do Not blend)

by Enel · in Torque 3D Professional · 09/07/2010 (12:02 pm) · 6 replies

im make MMORPG so i wanna control animation

current Torque offer blend animation for FPS games



but i just wanna play upper body animation during play run animation but it is blended run animation

so I think Torque Animation has a blend value (such as animation bone weight 0 ~ 1 )

if want to play just Upper body Animation(Attack etc..) than weight of Upper body Animation set modify 1.0 and weight of Lower body Animation ( base walk, run etc ) set modify 1.0 .. and mix two animation

how about that?.. if my opinion isn't right plz explain to me :) i'm just newbie to animation programming

#1
09/07/2010 (6:59 pm)
I've not done any Torque animation work in a while, but i'll take a shot.

What i think you want is to only export the upper body nodes for your torso animation, set a higher priority on the animation, and play it unblended.

An artist could come in here and describe how to exactly export your animations like that with priority and unblended.
#2
09/07/2010 (7:17 pm)
Just to point out ... some (blended) animations play as desired if played as a "recoil" but come out oddly mangled/blended if just played straight from script (thread).
#3
09/07/2010 (7:20 pm)
@tom

do you see that? what to do priority?

S32 TSThread::operator<(const TSThread & th2) const
{
   if (getSequence()->isBlend() == th2.getSequence()->isBlend())
   {
      // both blend or neither blend, sort based on priority only -- higher priority first
      S32 ret = 0; // do it this way to (hopefully) take advantage of 'conditional move' assembly instruction
      if (priority > th2.priority)
         ret = -1;
      if (th2.priority > priority)
         ret = 1;
      return ret;
   }
   else
   {
      // one is blend, the other is not...sort based on blend -- non-blended first
      AssertFatal(!getSequence()->isBlend() || !th2.getSequence()->isBlend(),"compareThreads: unequal 'trues'");

      S32 ret = -1; // do it this way to (hopefully) take advantage of 'conditional move' assembly instruction
      if (getSequence()->isBlend())
         ret = 1;
      return ret;
   }
}

if you said that run animation should be blend.. omg :( it is not right way..
#4
09/07/2010 (8:15 pm)
Greetings!

For my game I've done exactly as Tom wrote. Figure out which bones need to take part in a particular animation sequence and only include those in the sequence. And be sure to give the animation sequence a higher priority than your standard animation sequences, such as a run. For this to work you do not need to export your sequence as a blend.

For example: I have an arm waving animation sequence for my player to greet others. The wave sequence needs to animate the right shoulder, upper arm, lower arm, etc. bones down to the finger tips. In my 3D application, I indicate that only these bones should be exported as part of the wave sequence. All of the player's other bones are skipped. I also set my wave sequence's priority to something high, like 10. This will give this sequence's animated bones priority over any other playing sequence, such as root, run, back, side, etc. as those sequences are usually set to a priority of 0.

Now, if the player is displaying the root animation sequence and you perform a wave, only the right arm will come up and wave, as the wave sequence has priority over those bones. If the player were running, the same thing would happen with only the right arm.

To have the wave animation sequence play, I believe the script command is setActionThread() -- although I'll have to look it up when I have a chance to be sure.

I hope that helps.

- Dave
#5
09/08/2010 (6:41 am)
Enel -- Can I email you direct? Or could you send me a email termls1@gmail.com is my address.

Thanks.
#6
09/08/2010 (6:53 pm)
why torque dosent exsist 'Blend Weight' value?

so than i dont understand to do blend animation in torque

i find handleBlendSequence function but.. i dont understrand..


i should more study :(..