Game Development Community

Nodes not properly animated during transition between animations

by Stephane Conde · in Torque Game Engine · 08/05/2005 (12:17 am) · 6 replies

I have done a fairly extensive search (including a couple of direct queries to some people 'in-the-know') about this issue without finding any satisfactory answers.

The problem is that any nodes (such as mount0, mountPoint, ski0, etc.) that are added to the animation heirarchy are not properly animated during a transition between animations.

This behaviour is evident in both TGE and the Torque ShowTool Pro, so I believe it is a genuine bug. To duplicate this behavior, create an animation with a lot of movement, add a node (such as mount0) to the heirarchy (so that it follows the animation properly). Then, simply use the Torque ShowTool Pro's Thread Controls, play the animation that has a lot of movement and switch to another animation in that thread at some point (you can pause the animation, switch to the new animation and then hit play again to get the timing right). If you highlight one of the nodes that you added to your heirarchy, you will notice that it does not follow the animation when transitioning. The node will take a direct line to its new location in the new animation... The big problem comes in when you have something mounted to your node... it will take a straight line to its final resting position...

First, has anyone else encountered this?
Second, is this actually a bug, or is it 'as-designed'?
Third, if it isn't a bug, what in the hell am I doing wrong?
Fourth, if it is a bug, might anyone have any pointers on where to get started to fix it?

As usual, thank you very, very much in advance for any insight you can provide... you help is greatly appreciated!

Stephane

P.S. If you need any further detail, let me know!

#1
08/05/2005 (2:45 am)
When a node is in a transition state (ie, affected by an thread that is transitioning from one sequence to another), it is linearly interpolated to the new "correct" position. This is by design.

What would you expect to have happen?
#2
08/05/2005 (6:43 am)
Did you try parenting this 'added' node to the animation hierarchy, instead of keyframing it's position? I would not expect an unparented Node to stay 'in reference' to the others...I will try your testing method of a very animated rig and mounted image this morning with a shape I just yesterday added a mountpoint Node to. The very complicated Dance and Range to me would be very animated and I didn't really see this happening. Solution may be in the art asset.


Here's what I just did and did not see this issue at all:
I took a player shape I just added a Node to yesterday, [the base dts shape-that was parented to the left hand Node].
It validated all the sequences.
I mounted a pistol I use to check, on the new Node.
I created New Thread[1], in addition to the default Thread0.
I ran "player_dance.dsq" in Thread0.
I then went into Thread1 and Transitioned to every sequence in the shape, and never noticed my newly added Node, ever moving out of reference to the others.

...all done in ShowToolPro, with the Thread Controls dialog.

Try parenting the Node into the hierarchy, I would suggest and retrying the test method.
#3
08/05/2005 (9:34 am)
The node in question is definitely parented to armature in the rig... therefore I would expect the node to follow the armature it is parented to during a transition.

For example, if a mount0 node is parented to the hand of a character (like in my case), the node should move with the hand during a transition, and not cut through the back of the character... I mean, the hand bone that the node is parented to doesn't cut through the back of the character, so why should the node?

If the node moving independently of its parent is 'by-design' as Ben suggests, does anyone have any suggestions as to where to start looking to change this? I mean, if the hand itself can be transitioned properly to its new position, why can't the node that is mounted to it also transition properly?

Thank you very much for your posts Ben and Rex... Unfortunately, my new animation that I am transitioning to is not a blend animation, so I cannot use a new thread. My new animation is being transitioned to in the same thread as the previous animation... could that be part of the reason we are seeing problems?

I am going to take a look at the Torque Orc and see if I can notice the same issues there...

Stephane

P.S. I am using maya and the maya converter to get stuff into Torque... if that makes a difference
#4
08/05/2005 (9:45 am)
Alright, I just checked the Torque Orc and everything works fine there... which is great! That means its just something that I am doing wrong or something wonky in maya/maya2dts...

My node is definitely parented to a bone since it moves along just great during the animation... it is just when in a transition that it doesn't follow its parent and goes its own route.

Are there any export options or anything that needs to be done to get this functionality working?

Could this be a flaw in the maya2dts plug-in?

Any ideas, as I'm at a loss...

Thanks again in advance for any help!

Stephane
#5
08/05/2005 (9:58 am)
Alright... found the problem. For that specific character, the animator wasn't putting that node into the heirarchy... the node was outside the heirarchy and he was using a 'parentContraint' to parent it to the bone. This meant that the node was following the bone during the animation (because it was key-framed to follow it), but it didn't follow the bone during the transition because there are obviously no key-frames for that.

Unfortunately we need to keep the parentConstraint on there, so we will just have to make a new node that IS part of the heirarchy that we use specifically when we are transitioning.

Thank you very much for the help posts!!

Stephane
#6
08/05/2005 (11:09 am)
Glad you got your problem resolved!