Game Development Community

Z axis inverted in Torque.

by Jeffrey Bakker · in Artist Corner · 10/18/2005 (7:01 pm) · 9 replies

Edit:
Since I can't edit the topic title, I'd like to clarify that the Z axis is not inverted on the shape itself. It is inverted on the animation.

I'm taking the small steps of inserting my first character into TGE, starting with a simple Root animation. The Root anim is basically just breathing (shoulders up then down, chest out, then back in). When I exported it to Torque, and loaded it up in the Show Tool, the Z axis on the animation is inverted (shoulders go down and up, instead of up then down, yet the chest moves out and in just fine).

This is how I animated it in Blender: Before I started work on any animations, I did the Ctrl+N to the armature to make sure the rotations are reset, as I once read in a tutorial. In Pose mode, I made the first standing pose and keyframed all the bones' LocRot. Then I went to frame 11, and keyframed the same pose LocRot. Then back at frame 6, I grabbed (G) the Clavicle bones and moved them up a bit, then grabbed Rib bones and moved them a little forward. I keyframed the Clavice and Rib bones' LocRot. It played just fine in Blender, so I exported to DTS format.

I have another question related to my Root animation. How do I get the Root animation to loop in Torque? In the Show Tool it will only play one breath, and I have to delete the thread and create a new one to play it again.

Thanks.

#1
10/19/2005 (2:13 pm)
Update

Under closer inspection, the shoulders weren't going down then up, but rather towards eachother and back out. So, that you be more like an axis swap, rather than a z axis invert. The ribs however, was still the same case: a z axis invert. Either the case, it is a problem.

I tried approaching the breathing animation differently this time. Instead of moving the bones with the Gkey, I simply just used rotate (R) on the bones. After exporting it to DTS, the animation looked the same in Show Tool as it did in Blender. :)

So now that it's fixed, I still don't understand why. Are we not supposed to use the Gkey on bones at all (on non-IK handles) when making poses? I would be fine with this, as long as I can get away with using only rotations to do all my animations. If this is not true, then what are the basic steps I should take in aligning axis properly before animating?
#2
10/19/2005 (3:16 pm)
Have you read through this thread to see if it is the same problem?

www.garagegames.com/mg/forums/result.thread.php?qt=33688

There is some really good advice there about clearing rotations so TGE doesn't get confused.
#3
10/19/2005 (3:43 pm)
Heh. I've read that thread before, and I've been looking for it (but I forgot what it was even called). Thanks a lot for finding it. I'll try what was suggested in the thread.

I've read so many different things, it is quite confusing. In different places, I've read of doing Ctrl+N, Shift+A, Ctrl+Shift+A, and now Alt+R and Alt+S before doing any animation. So which one really is it? Should I do them all, and if so in what order? Regardless, I'll do what that guy said in the thread.

There should be a forum thread (a sticky one so its easy to find) made specifically as a guide for Blender to Torque exporting and a step-by-step of what one needs to do before animating so that the armature will be setup properly in TGE once exported. This way, we can prevent people from having this problem to begin with, and easy answers to people that do (I'm sure I won't be the last to come accross this problem).

I always thought that exporting was a lot easier than modelling, but it is tricky because it is not as straight-forward as it seems when the animations show up differently in the game engine.
#4
10/19/2005 (8:05 pm)
...
#5
10/19/2005 (8:05 pm)
...
#6
10/19/2005 (8:58 pm)
[TDN Cheerleader /on]
Quote:
Heh. I've read that thread before, and I've been looking for it (but I forgot what it was even called). Thanks a lot for finding it. I'll try what was suggested in the thread.

I've read so many different things, it is quite confusing. In different places, I've read of doing Ctrl+N, Shift+A, Ctrl+Shift+A, and now Alt+R and Alt+S before doing any animation. So which one really is it? Should I do them all, and if so in what order? Regardless, I'll do what that guy said in the thread.

There should be a forum thread (a sticky one so its easy to find) made specifically as a guide for Blender to Torque exporting and a step-by-step of what one needs to do before animating so that the armature will be setup properly in TGE once exported. This way, we can prevent people from having this problem to begin with, and easy answers to people that do (I'm sure I won't be the last to come accross this problem).

Great question, and even better answers! And of course, the first thing I thought about was Let's get TDN cranking!

[TDNCheerleader /off]
#7
10/19/2005 (10:56 pm)
@Joseph:

Thanks very much for the detailed explaination of the armature transformations and such. Completely makes sense reading it, yet I'm sure I'll have to go through it in Blender a few times before I really get the hang of it. Thanks again.


@Stephen:

By the time I have all my character animations exported right, I'm sure I'll have enough knowledge to make a good wiki on TDN about it, that's assuming if someone doesn't beat me to it (which someone already experienced probably will).
#8
10/19/2005 (11:24 pm)
...
#9
10/20/2005 (4:58 pm)
With the little (but potentially useful for newbies) knowledge I have, I figured I'd get us started on the TDN->TGE->DTS->FAQ->Blender page. These are stupid things I spent hours on when I started exporting.