Hey guys, I'm starting to work on animations for my friend and I's game, but I keep running into blocks. (I'm using XSI 5.11 and the programmer's using OGRE.)
First, how can I get animations to blend together. I know that's all done in code, but how I do make it easier for the programmers to work with? For instance, in my walk cycle, I animate all the bones. They all have a translation, and even if they don't I save the translation of 0 for that cycle. So when I play the animation everything is fine. I create another animation, one where the character shoulders his rifle. I use the start pose of the walk cycle as the start pose of him shouldering the rifle and everything is fine. But when I make a third animation, one of him standing upright (his walk is pretty crouched and sneaky-like), the last frame of that animation is not the same as the last/first frame of his walk cycle. So when I make the character walk, then stop and stand, then shoulder his rifle, the character spazzes out and he ends up aiming at the sky. I know the reason he does it is because the key frames for the beginning of the aim animation don't line up with the last frame of the standing animation. So what do I do? Do I make animations for every conceivable combination? That could get extensive, not to mention meticulous to make sure they all started and ended in exactly the right spot so his movements don't jump.
Second, what do I do about realtime decisions in mid-animation? For instance, our character is going to have grenades on his leg and be carrying a rifle. When the player presses a certain key (call it 'G' for now), the character will reach to his thigh, grab a grenade and throw it. But the player culd push that at any point in an animation, so how do I know where to make the character's hand go to grab said grenade? It could be in any point of the forward/back motion.
I know there are more but I can't think of them right now. These are the two big ones that are stopping me from doing anything productive
Replies
You might be able to just export the legs once for the run, and then animate and export just the upper body for the all the different weapons you might need.
Hopefully that makes sense.
Any thoughts yet on how to make the upper body and lower body synch up on something like a grenade grab and throw? One idea i had was to simply ignore it and make the hand to go to the average spot of the grenade and make the grenade appear in hand, since it will only be there for a few frames. I didn't want to do this right away because I figure somewhere down the line I'll run into a similar situation that I can't cheat myself out of.
Any thoughts yet on how to make the upper body and lower body synch up on something like a grenade grab and throw? One idea i had was to simply ignore it and make the hand to go to the average spot of the grenade and make the grenade appear in hand, since it will only be there for a few frames. I didn't want to do this right away because I figure somewhere down the line I'll run into a similar situation that I can't cheat myself out of.
[/ QUOTE ]
That's how every game has done it from what I've seen. They reach behind around the belt, and out comes a grenade in their hand. You might do a pulling pin part or an idle bit holding the grenade about the throw if you decide to incorporate "cooking off" a grenade.
I didn't know if that was an accepted way or not
[/ QUOTE ]That's pretty much the rule for games. You can even designate a spine bone's rotation to be driven by the mouse input. So when the player stops and looks around so does the torso. Most engines even control where the head is looking. Some engines have you create extreme frames for those bones controlled by code. Which end up being where the engine will stop rotating, so your player won't break its back or have its head go through its crotch. I don't know how it all works on the code end, I just know from an animation stand point thats what I've had to do in the past with engines like Quake, Doom, Half Life, Unreal tournement.
so heriarchy is:
Null
__Pelvis
___Torso Base
____Torso
_____Upper Torso
etc
In most cases the player is going to be using the mouse to look around not move. Looking can act as steering but you don't want to waste mouse input on something that is on or off, a key can do that well enough.