Game Development Community

Blending animation and collada

by PGames · in Artist Corner · 04/15/2010 (8:37 pm) · 4 replies

I have been trying to setup a blend animation of swinging a sword and walking, but the end blend is completely messed up with limbs all twisting in T3D. Does anyone have any tutorials on setting up a blend animation or a max file of a working heiarchy? Or is it due to the fact that I need to use the DTS exporter instead of opencollada? Any help would be appreciated.

#1
04/16/2010 (11:11 am)
I think it may come down to how you are using the engine to call your swinging arm animation on top of the action thread.....

Setting up blends is relatively simple, the key is referencing a keyframe[Blend Reference Frame] when exporting, usually done thru your exporter.

Triggering the sequence and getting it to function correctly with an action thread is another part of the process...see my comment#1, especially with T3d and weapons, and all the new actions[swim/crouch/prone]. Now, that would be a good video tutorial! Eh?!!;)

#2
04/17/2010 (7:00 am)
Having a tutorial vid would be nice. heh.

Has anyone actually successfully blended DAEs (exported with opencollada)? I'm thinking of switching to DTS and DSQ for the skinned animated objects simply because I can't find any references on getting DAEs to blend correctly.
#3
02/23/2011 (8:21 pm)
Hi, I am also facing the same problem as threadstarter. The arms and legs are all messed up when trying to blend "run" with "punch".

However, after much investigation I finally understood how blending in Torque 3D Pro works. Only after figured it out then I realise that the blending capability of Torque 3D Pro is not capable of achieving what we want.

The root coordinates of nodes in the blend sequence has to be close or identical to the root coordinates of nodes in the sequence you are blending with. This is the sticky part. There is almost no chances for all animations to have the same root coordinates of nodes! Most animations will have different posture and movement.

Blending in Torque 3D Pro is only good for "look" animations. It works great. But if you want to blend an upper body sequence with X number of lower body sequences, you need to create X upper body sequences that matches the root nodes coordinates of all lower body sequences then use script to blend them on the fly.

Seriously, I really hope I am wrong. Because if sequence blending in Torque 3D Pro indeed works like this, then it is almost useless unless you just want to blend specific sequences.

Any experts out there can prove me wrong? The question is: How do you blend "run", "walk", "root" and "jump" with "punch"? My expectation of a successful blend is the player able to punch while running, walking, idling and jumping.
#4
02/24/2011 (8:18 am)
Not quite Jinnie. Blending works like this.

Blends in Torque are additive.

When an animation is exported as a blend, the engine reads in the offset and not the absolute data of the animation based on what it sees over time. So what this means is that the engine sees an engine change of 0 to 30 degrees on the X axis as opposed to 125 to 155 like it would see from a non blending animation.

As such, when you factor in that blend animations are additive, this means that the offset changes that occur over time are added onto what the engine has playing below it.

You can use blend animations for more than just "Look" animations and in fact can do a whole bunch of wonderful animations like sword swings, a bow and arrow animation set, different types of weapon animations for guns, ambient animations, facial animations, cinematic animations for storyteling... basically anything that you can think of. The key though is that you have to understand the system and how it works.

As a tip though, you starting off you normally do not want to be animating anything as a blend that is below the Bip01 Spline01 since this can greatly affect the position of the legs and rotation of the character body. If you really know what you are doing and understand the system you can start to work with the lower body bones to create animations like crouching.

I hope that this helps.