Animation Questions
by Jason Gossiaux · in Artist Corner · 08/09/2008 (6:21 pm) · 13 replies
Howdy folks,
So I've modeled a simple figure and added root, run and death animations. I used MS3D and the advanced exporter, storing the animations inside the file because adding a .cs and dsqs has never worked for me.
Well the root/run work just fine because the engine handles them automatically. The death animation is called from script using playthread, and I have a throw animation I call from script using playthread.
The problem is things blend oddly. Some of my bots throw correctly and complete the whole animation. Others just play half of it then stop. This is while standing in one place, so the run animation shouldn't be interrupting it.
The other odd thing is if a bot dies halfway through a throw, they fall down in some messed up state. Its like it doesn't fully blend from the current animation into the final keyframe of the death animation.
Lastly, when I try to add the headside and look animations in a blended form, my bots arms get crossed behind their back when running around. It is so odd....
Would anyone happen to have any insight into this? It's kind of confusing me :P
So I've modeled a simple figure and added root, run and death animations. I used MS3D and the advanced exporter, storing the animations inside the file because adding a .cs and dsqs has never worked for me.
Well the root/run work just fine because the engine handles them automatically. The death animation is called from script using playthread, and I have a throw animation I call from script using playthread.
The problem is things blend oddly. Some of my bots throw correctly and complete the whole animation. Others just play half of it then stop. This is while standing in one place, so the run animation shouldn't be interrupting it.
The other odd thing is if a bot dies halfway through a throw, they fall down in some messed up state. Its like it doesn't fully blend from the current animation into the final keyframe of the death animation.
Lastly, when I try to add the headside and look animations in a blended form, my bots arms get crossed behind their back when running around. It is so odd....
Would anyone happen to have any insight into this? It's kind of confusing me :P
About the author
#2
I did a ton of reading today on the issue but am still a bit confused. What I'd like to do is have the ability to call one throw animation that affects the arms and upper body, and have it play completely without interruption even if the player is running, walking or standing still.
From 10 hours of study I believe the following are my options:
1). Use playthread on the player/bots with non blended throw animation
Pros - Player can stand and throw correctly and run and throw correctly.
Cons - After the first throw the player's arms fail to continue their run animation forever.
2). Use playthread on the player/bots with a blended throw animation
Pros - Player's arms keep working after the throw.
Cons - The throw is blended into the run. The run animation has swinging arms, which distorts the throw.
3). Use setactionthread with blended or non blended throw animation.
Pros - Player can throw while standing still.
Cons - Doesn't work while running.
4). Split the run into two parts, one for the legs and one for the arms. then use setarm?
Pros - Not sure, people have said this is the correct way to handle running + animation
Cons - No good examples. MS3D can't split exporting via nodes from what I can see.
5). Modify the engine to fix the setactionthread problem where run overrules other animations, then use setactionthread with non blend animation
Pros - Can throw while running.
Cons - The player stops running during the throw.
6). Modify the engine to fix the setactionthread problem where run overrules other animations, then use setactionthread with blend animation
Pros - Can throw while running.
Cons - setactionthread doesn't seem to like blend animations. My bot's arms go flying out to the side before throwing. I'm not sure why, the blend reference frame is the idle animation with the arms straight and not out to the side.
7). Code all animations directly into the engine.
Pros - I guess this might fix the problem?
Cons - A bigger project then I think it should be. Easier solution might exist?
Any help or advice is appreciated.
08/17/2008 (10:07 pm)
Well I managed to get dsq animations working. So now I can probably look into blend animations.I did a ton of reading today on the issue but am still a bit confused. What I'd like to do is have the ability to call one throw animation that affects the arms and upper body, and have it play completely without interruption even if the player is running, walking or standing still.
From 10 hours of study I believe the following are my options:
1). Use playthread on the player/bots with non blended throw animation
Pros - Player can stand and throw correctly and run and throw correctly.
Cons - After the first throw the player's arms fail to continue their run animation forever.
2). Use playthread on the player/bots with a blended throw animation
Pros - Player's arms keep working after the throw.
Cons - The throw is blended into the run. The run animation has swinging arms, which distorts the throw.
3). Use setactionthread with blended or non blended throw animation.
Pros - Player can throw while standing still.
Cons - Doesn't work while running.
4). Split the run into two parts, one for the legs and one for the arms. then use setarm?
Pros - Not sure, people have said this is the correct way to handle running + animation
Cons - No good examples. MS3D can't split exporting via nodes from what I can see.
5). Modify the engine to fix the setactionthread problem where run overrules other animations, then use setactionthread with non blend animation
Pros - Can throw while running.
Cons - The player stops running during the throw.
6). Modify the engine to fix the setactionthread problem where run overrules other animations, then use setactionthread with blend animation
Pros - Can throw while running.
Cons - setactionthread doesn't seem to like blend animations. My bot's arms go flying out to the side before throwing. I'm not sure why, the blend reference frame is the idle animation with the arms straight and not out to the side.
7). Code all animations directly into the engine.
Pros - I guess this might fix the problem?
Cons - A bigger project then I think it should be. Easier solution might exist?
Any help or advice is appreciated.
#3
However if you have any direct questions about the c++ code (of your player behaviour) this is not the place to discuss it, make a thread about it in the private forums instead.
08/18/2008 (11:21 am)
Jason, you are on the right way. Making animations to suit your needs is a hard work. Anyway it's extremely helpfully if you understand how the animations are played based on the user's input (in the SDK). if your player is like the SpaceOrk , i mean if you plan to use similar behavior probably you won't need to modify anything. But if your character has some uncommon animations you've got to understand the C++ code in the SDK.However if you have any direct questions about the c++ code (of your player behaviour) this is not the place to discuss it, make a thread about it in the private forums instead.
#4
However if you have any direct questions about the c++ code (of your player behaviour) this is not the place to discuss it, make a thread about it in the private forums instead.
08/18/2008 (11:22 am)
Jason, you are on the right way. Making animations to suit your needs is a hard work. Anyway it's extremely helpfully if you understand how the animations are played based on the user's input (in the SDK). if your player is like the SpaceOrk , i mean if you plan to use similar behavior probably you won't need to modify anything. But if your character has some uncommon animations you've got to understand the C++ code in the SDK.However if you have any direct questions about the c++ code (of your player behaviour) this is not the place to discuss it, make a thread about it in the private forums instead.
#5
Eh, I don't really want anything too amazing. The ability to run and hold various weapons in different poses is necessary, but I've seen no good examples of how to do just that. Being able to run and have the arms wave or throw is also a necessity. Beyond that I do not need anything else.
The tutorials for animation I've seen always use full body animation for running (ie, arms and legs). Is that improper for what I want? Do I instead need to have run be only the leg joints, and then play arm movements on top of it?
Hmm... ok maybe this would fix my problem- How can I have PlayThread actually STOP and not clobber my run animation forever more?
08/18/2008 (12:12 pm)
Quote:
if your player is like the SpaceOrk , i mean if you plan to use similar behavior probably you won't need to modify anything.
Eh, I don't really want anything too amazing. The ability to run and hold various weapons in different poses is necessary, but I've seen no good examples of how to do just that. Being able to run and have the arms wave or throw is also a necessity. Beyond that I do not need anything else.
The tutorials for animation I've seen always use full body animation for running (ie, arms and legs). Is that improper for what I want? Do I instead need to have run be only the leg joints, and then play arm movements on top of it?
Hmm... ok maybe this would fix my problem- How can I have PlayThread actually STOP and not clobber my run animation forever more?
#6
What I did is setarmthread to the rootpose first then play throw animation but it maybe has a better way to fix that.
08/18/2008 (12:45 pm)
For no.6 What I did is setarmthread to the rootpose first then play throw animation but it maybe has a better way to fix that.
#7
Then the armthread is a 2 frame blend with its reference as the rootpose?
Then the throw animation would be a blend animation with the rootpose as its reference?
I guess for each weapon pose for the arms I'd need a different blended throw animation with a reference to that specific pose...
After looking at the Ork model again I think I see some of my problem. His arms don't move while running, and that probably makes everything a ton easier.
08/18/2008 (1:21 pm)
So the rootpose/run animation is a non blended cyclic animation with only leg movement, right?Then the armthread is a 2 frame blend with its reference as the rootpose?
Then the throw animation would be a blend animation with the rootpose as its reference?
I guess for each weapon pose for the arms I'd need a different blended throw animation with a reference to that specific pose...
After looking at the Ork model again I think I see some of my problem. His arms don't move while running, and that probably makes everything a ton easier.
#8
Just to add:
The Space Ork root pose is fullbody. The mouse move is coded to play a blend animation to the arm bones.
So when running you have again playing fullbody "run" and moving the mouse when running plays again that blend animation. This is the way i did my first character and its animations. I haven't much experience with the SpaceOrk, but i am sure it is coded and animated in the way i described :).
08/19/2008 (12:11 pm)
Jason, you can make what you need in several ways. If you want to make additional moves to the arms you can do it with blends. This will make additional transforms to the arm bones. With several experiments you can reach satisfactory results. Have you heard about sequence priorities? This is another method. Also you can code your arm bones to play the desired animations in the SDK. You can code to stop the fullbody "run" based on the input and can separate some animations and play them in 2,3 or 4 threads. TGE offers great SDK and when you get more experienced with it you will see that everything is possible. As far as I undestand you just want to do additional animations to the arms. Do it with blend animations. Anyway you have to experiment.Just to add:
The Space Ork root pose is fullbody. The mouse move is coded to play a blend animation to the arm bones.
So when running you have again playing fullbody "run" and moving the mouse when running plays again that blend animation. This is the way i did my first character and its animations. I haven't much experience with the SpaceOrk, but i am sure it is coded and animated in the way i described :).
#9
When I model I tend to use a davinci pose. This makes blends tricky, because they seem to start from the root pose when using setactionthread. The engine enabled animations like look and headside also seem to start from the rootpose, wheras playthread starts from the last frame.
What I'm saying is that the blend animations kind of require you to know what the pose is going to be like at the start. Blends are just an offset. So without knowing where you start, you can't know where you will end up. This makes multiple look animations (ie, for multiple weapon types) impossible?
Am I off course here?
08/19/2008 (10:05 pm)
I guess the spaceork works because it isn't very versatile. The unanimated root pose is the same as the basic look animation. If the rootpose happened to have the arms at the orcs side, I'm not sure they could have acheived the same results, right?When I model I tend to use a davinci pose. This makes blends tricky, because they seem to start from the root pose when using setactionthread. The engine enabled animations like look and headside also seem to start from the rootpose, wheras playthread starts from the last frame.
What I'm saying is that the blend animations kind of require you to know what the pose is going to be like at the start. Blends are just an offset. So without knowing where you start, you can't know where you will end up. This makes multiple look animations (ie, for multiple weapon types) impossible?
Am I off course here?
#10
Either I am running into SDK errors, I am running into MS3D exporter errors, I am running into ShowTool errors, or I'm just out of luck :P
Let me describe what is happening...
I have a rigged model that I am exporting using .cfg files so I get fine control over which nodes are being modified. My model be default has a slight da vinci pose before rigging and animating.
I have a root animation with the player just standing in one place. This has only the legs and spine animated in a breathing state.
I have a look animation that only affects the arms. This is 30 frames long. The keyframe is the da vinci root pose. Frame 1 is looking all the way up and Frame 30 is looking all the way down. It is exported as a blend animation.
I have a castspell animation that only affects the arms. It is 16 frames long and has the player casting a spell out in front of them.
In show tool I load up the model using "Load DTS and CS".
I load the root animation in thread0 and the player stand there breathing. His arms are out in the davinci pose because I exported the animation without the arm nodes present.
The look pose is loaded into thread1. I can make the model look up, and down. I set it to the middle and leave it there.
I load up the cast spell animation into thread2. When played I get random results. Sometimes it plays correctly. Other times it plays incorrectly. By this I mean the blend is inverted so he throws off to the side and down, and not out in front. I can LOAD DSQs and load the animation as a second sequence, and this usually plays correctly all the time, wheras the first instance of the sequence does not.
Do you have any ideas why this might be happening? Thanks!
09/01/2008 (5:48 pm)
So I'm still having one hell of a time figuring this out. Either I am running into SDK errors, I am running into MS3D exporter errors, I am running into ShowTool errors, or I'm just out of luck :P
Let me describe what is happening...
I have a rigged model that I am exporting using .cfg files so I get fine control over which nodes are being modified. My model be default has a slight da vinci pose before rigging and animating.
I have a root animation with the player just standing in one place. This has only the legs and spine animated in a breathing state.
I have a look animation that only affects the arms. This is 30 frames long. The keyframe is the da vinci root pose. Frame 1 is looking all the way up and Frame 30 is looking all the way down. It is exported as a blend animation.
I have a castspell animation that only affects the arms. It is 16 frames long and has the player casting a spell out in front of them.
In show tool I load up the model using "Load DTS and CS".
I load the root animation in thread0 and the player stand there breathing. His arms are out in the davinci pose because I exported the animation without the arm nodes present.
The look pose is loaded into thread1. I can make the model look up, and down. I set it to the middle and leave it there.
I load up the cast spell animation into thread2. When played I get random results. Sometimes it plays correctly. Other times it plays incorrectly. By this I mean the blend is inverted so he throws off to the side and down, and not out in front. I can LOAD DSQs and load the animation as a second sequence, and this usually plays correctly all the time, wheras the first instance of the sequence does not.
Do you have any ideas why this might be happening? Thanks!
#11
09/02/2008 (9:39 am)
Apparently it was a priority issue. My blended arm animations needed to be of a LOWER priority than the look animation. ie, 4 compared to 5. If they are equal to or higher in priority the behavior is random. What a mess :P
#12
In this scenario I have a cyclic root thread playing on the back nodes. The arm nodes have a blended look animation. Then I use playthread(2, "point") on the player. Normally he'd point, and then retract his arms. Using a schedule I pause the thread right when he's out pointing. Now half the time he just stands there and continues to point. The other half the time his arm and hand jump slightly before pausing.
I'm thinking it might be the engine trying to predict what it should look like, then catching up and realizing it was off a little bit. Would that make sense? Stepping through the engine code I'm not seeing where things could be getting out of sync. Thanks for any help you can give me on this!
09/04/2008 (12:30 am)
I've noticed when using Pausethread that occasionally the animation will skip slightly before pausing. In this scenario I have a cyclic root thread playing on the back nodes. The arm nodes have a blended look animation. Then I use playthread(2, "point") on the player. Normally he'd point, and then retract his arms. Using a schedule I pause the thread right when he's out pointing. Now half the time he just stands there and continues to point. The other half the time his arm and hand jump slightly before pausing.
I'm thinking it might be the engine trying to predict what it should look like, then catching up and realizing it was off a little bit. Would that make sense? Stepping through the engine code I'm not seeing where things could be getting out of sync. Thanks for any help you can give me on this!
#13
02/28/2010 (7:04 pm)
Jason, did you ever get this working the way you wanted?
Torque Owner MARIA SALAZAR
the throw animation stop because your AI moved while throw animation playing or your sequence animation doesn't long enough to cover all of the throw animation.
(I guess throw animation is full body).
All of animation looks weird because of your rootpose. Did you export blend animation from frame 0 or
1 (leave rootpose@frame 0) ?
hope that helps