Game Development Community

Has ANYONE Actually got a figure INTO Torque with Animations?

by Alaric Karczag · in Artist Corner · 06/06/2005 (9:26 pm) · 20 replies

I have been beating my brains out trying to get the animations to work right and they still compound upon each other.

The issue im having is this:
I created the character with arms out in blender, for skinning, and now that im trying to animate it, all the animations work off the origionaly pose- which they are Not supposed to do. The animations are supposed to be relative to the root animation.

How can you Set the initial pose from inside the Pose Mode?

only other way is to try and rebuild the mesh into the root pose, then redo the skeleton to the root pose too. and that suks. im not building characters twice just to use Blender.

Is anyone willing to share how they do their animations? and possibly swap a .blend so i can look at it?

I got the character into torque fine- looks great.
he stands there in his root animation doing his thing. but, when the run animation kicks in he goes Back to his 'arms out' base pose, and runs along -wtf?
only way i found to fix was to record the run sequence like the root and have the first frame record the position of All armatures. then he runs right.

but now if i have the blends of looking up/down, and arms up/down, they stack the rotation that sets the figure to its starting pose, so there are 2 "set to root pose" modifiers on the animation stack.
the blends are supposed to modify the root animation, and just record changes-

Only way i can see to get the figure into a Root pose as a DTS is to:
Make em
bone em up
reposition em
export the root pose as another type of model,
re-import them as a mesh- this brings them into blender in the root pose without a skeleton, but its built to the right porportions.
Re-import the skeleton -arms out pose
re-edit the skeleton to match the root pose
and re-attach it.

now the figure is IN his root position, and all animations "should" work right.
but im still in the middle of rebuilding him- and if i always have to do this I'll switch back to milkshape.

#1
06/06/2005 (9:27 pm)
And i dont want any posts point to the Gus thing, it only has one or two animations and he doesnt go into how to DO the animations- just that it can be done...
#2
06/07/2005 (3:02 am)
In max you would set these animations to be blend of the root mode. So you take the root pose, then you make a new sequence for whatever you want, arm punch and that is set to blend, so it blend with the root pose and you can use both.

Toby.
#3
06/07/2005 (9:42 am)
To clarify, FruitBat is incorrect about the skeletal system: TGE uses a 'skeletal' system, based on nodes. Nodes and Bones mean the same thing to TGE. Each vertex in a skin mesh is transformed according to the node(bone) transform * weight when it is marked as animated in the .dts file.

TGE will also do 'baked' mesh animations, ie moving each vertex individually per frame, but the Blender exporter does not export this type of animation. Vertex animation is usually not space friendly, either on the HDD or in ram, and not recommended unless absolutely needed anyways, most animations can be done using a node based animation.

TGE has a very robust animation system. The current interface to the animation system from Blender it isnt the most elegant, but it does work.
#4
06/07/2005 (9:47 am)
Jameson is right, Torque most definatley supports a skeletal system, though I do beleive you have the option to export a baked animation from the blender exporter.

Baked animations are much larger and less friendly, you should stick with a proper skeletal system if you can to run more efficiently.

Unfortunately I haven't had a lot of experience expoting characters, I did get a very simple "blockman" character exported, though he is comparable to gus, he had a root pose and ran around fine.
#5
06/07/2005 (10:07 am)
FruitBat grovels at his misinformation
#6
06/08/2005 (9:45 am)
Also, the exporter doesn't support IK, so if you want to use IK constraints to animate your armatures, you will have to BAKE the animation.
#7
06/08/2005 (10:31 am)
Well, I have had some problems with the blender exporter but none of them relate to the animation problems you're having.

I built a simple guy with a root, run, walk, and the look animations (looknw, etc.) and he seemed to have exported fine. In fact, I've built three models which run and look around properly, although some of them look quite cheesy...

All the animation modifiers work off of the original bone locations, which you can see in edit mode. The initial position of the root animation doesn't have any special meaning, which perhaps it did on some other tool you used. If you build a "run" animation that just animates the legs, and build a "look" animation that is blended and controls the arms, then when your guy runs in torque it should just blend the look animation on top of the run animation and your guy should not run around with his arms out.

Based on your previous posting Alaric, the run animation is NOT blended but applied directly to the skeleton instead of the root animation, and the arm look animation is blended on top of the run animation. If your guy stops moving, the root animation is applied instead of the run animation, and the arm look animation and blended on top of the root animation.

So the root, walk, run, swim, etc animations will not have the "blend" thingy checked in the exporter and the look/looknw/head/headside animation will have the "blend" option turned on.

If you want we can swap .blend files to see what is going on. I have three files of varying complexity and messiness for examples :)
#8
06/08/2005 (10:36 am)
Great description Gary... the best thing I could suggest is to purchase show tool pro and bring in the player.cs from starter.fps into it with all the sequences, then you can see how the orc is set up.
#9
06/08/2005 (10:56 am)
Yeah Matt, I only have the demo show tool pro. It saved a lot of time by helping to see which bones/animations were set up wrong.
#10
06/10/2005 (10:36 am)
I have Show tool pro, and i see that when the character is loaded he is already in his root pose.
when creating characters they are usually designed with arms out in a "base" pose (don't know what else to label it).
I dont use IK, only FK.
I am not Baking my animations, i have found out that any issues are usually resolved by using the Interpolate option-that's great!
My run animation is a full animation, independent of the root.

Is there a way in Blender to "reset" your Rest pose?
When i Load the character into Show Tool Pro he's in his base pose, unlike the ORK who starts in his root pose (before any sequences are applied).

Question: does your Run sequence capture all nodes? or just animating the legs moving.
#11
06/13/2005 (4:28 pm)
For my setup... my root pose just moves the legs and torso. The run animation animates only the leg bones. The look and looknw animation just animate the arms.

I'm not sure if this is what you want, but in Blender's Pose Mode 'Alt-R' will reset the rotations for all selected bones, which should put them back into their original positions.
#12
06/14/2005 (12:45 am)
Actually im looking for, i believe, the oppisite of resetting the rotations.
Im looking for a way to set a bones current rotation as its 'origional' position.
so that when edited it goes to that new 'origional' pose.
if you open Torque show too pro, and open the default Ork, with no animations applied, you notice he's in a root pose. the mesh has been deformed to this pose.
How can we output the mesh like that?

the only way i've found to change his base mesh is to:
1. create the mesh
2. bone him up
3. re pose him - so he's close to the pose for the root animation.
4. export him as a .obj
5 open a new file
6. import the .obj
7. RE-bone the character, and hope I can match the origional armature...
8. reset all the rolls per bone

and all that suks, because im basically having to create 2 skeletons for every model i build.
how can i skip all that? is there a way to set all rotations in the skeleton to 0?
or how about a way to permatently apply the skeleton deformations to the mesh?
#13
06/15/2005 (12:59 am)
I thought of another way of what i think is happening.

my root animation takes him out of his base pose, into the root pose. (full body-non blend)

now that the character is in his root pose i made the look animation. Since the root animation moved the arms into the root pose, when the look animation is blended on top, it puts the arms into the root pose again- effectively applying the "move to root position" rotations twice.
It was my thought that a Blend pose only looks at the rotations within an animation, and applys them to the animation.
Milkshape looks at the changed between the first and last frames in a blended sequenc, and only applys the Changes, not all modifications since the base pose. I thought thats the way blends were supposed to work, not recording all changes, but just changes within the sequence.

Blender is applying all changes since creation, instead of only blending the changes.

only a few ways to fix this that i can see:
1. have the ability to reset the figures base pose- ie clearing all rotations and setting their current positions to 0. if skeleton were removed, the mesh would still be in the root pose. basically applying the skeletal deformation to the mesh, and setting skeleton rotations to 0.
2. dont have a sequence affect more than 1 bone at a time. crappy option, as this limits animating.
#14
06/15/2005 (1:42 am)
Ok, you can extract a deformed copy of just the mesh, its in:
Scripts ---> Mesh ---> Apply Deformation

this skips the export/import nicely.

now, how can i deform the skeleton in pose mode, and then reset that pose to make it the base pose?
#15
06/15/2005 (4:25 am)
@ Alaric: I think you can only do it in edit mode, selecting both ends of each bone then rotating it (before parenting the object to the armature).

@ Gary: I would be very interested in seeing your .blend files. You said that in some animations you only animated some bones, not all of them. This is impossible to my knowledge, due to some errors which get reported on the blender console. Maybe something about my python setup is wrong, although i doubt it since everything else works fine.
#16
06/27/2005 (2:47 am)
If you need to see how gus was made you'll see when it comes to the animations the author directs you to a chapterin an online Blender book about how Gus was animated.

Just follow that link and then once finished come bake to the Gus tutorial.

I did this and was able to successfully animate a model and have it export into the Torque Show Tool Pro find with all animations displaying correctly.


EDIT: Here is a really really small avi (using Xvid) of a WIP of a model I've animated using the info contained in the awesome Gus ttuorial (if you follow the link to the animation section)
www.users.on.net/~symes/other/final.avi
#17
06/27/2005 (11:37 pm)
Oops, wandered off to a conference and totally spaced this thread :)

Alaric, typically the root, run, and walk animations don't
position the arms and hands, so that the look/looknw/etc
animations can position the arms properly based on where the
player is pointing his weapon. As an example, my root
animations usually just make the legs and torso twitch a bit.

Hadoken, I have a zip file of some animated models made
with blender. If you (or anybody else, for that matter)
wants a copy, plz email me. They are pretty silly looking
(one has four arms) but should provide you with some
useful examples. They all export to DTS fine on my
platform, which includes Blender 2.36.

Gary
#18
06/29/2005 (8:05 pm)
In order to get the animations to work correctly i had to make sure that one animation is NOT animating a bone belonging to another animation, and it has to be a blended animation.
i've noticed the setting of the bones to their starting positions gets recorded during a blend animation, which is incorrect.
ie:
root sets arms to root pose,
look starts with arm nodes in root pose, and animates goin up/down,
but,
when the two are used together the look animation applys its starting cordinates to the root animation, moving the arms double-ly to their root position, so they overshoot.
Im not a programmer, anyone know how to strip the starting positions information from a blended animation? it should only record the Changes in a blend animation...
so instead of recording "boneA rotates from X 30deg. +20deg" it should only record "BoneA rotates X+30deg"

otherwise we need a list of all the animations, and which bones each uses, and make sure that 2 animations using the same bones never happens.

BTW- the Head animation (not Blended) seems to play without issues, reguardless if the root animation is animating the head bones... why does this one work, and not the look?
#19
06/30/2005 (1:27 am)
I've found by keeping all animation sequences separate as distinct "actions" within Blender each action is exported separately and don't influence each other. Don't know if that helps or not.
#20
06/30/2005 (8:24 am)
Just get rid of the arm rotation keyframes in your root pose, and you should be fine.
The player will always have one of the arm animations positioning the arms anyway
(look, looknw, etc.) so the root animation shouldn't be positioning the arms.

If you really want to give the arms a "default" position, don't put it in the root
animation, but make an "armsdefault" action in blender that positions only the arms.
Then use that "armsdefault" action as the default arm animation; you will have to
modify the script file.

The reason you can't "strip the starting positions" is that it is no always obvious what
the starting position is. If you want to make the root pose your starting position
that is fine, but my characters have root, crouch, and swim animations, all of which
could reasonably be considered "starting positions". Which one would be the
starting position when I export?

Nevertheless, you could probably modify the python code to export bone rotations relative to some
predefined pose. It would just be a matrix inversion and multiply I would guess.