Crazy steven hawkings jell-o arms with blend animation
by Paul Fassett · in Artist Corner · 08/29/2005 (8:34 am) · 7 replies
I am doing full body animations for the game I am currently working on, mixed with blend animations for things like sword swings. Said sword swing looks fairly decent in max, but when I export it and play it in game, the arms do the sulu dance and warp all crazy like, vertices are pulled all to hell and it looks like a crazy boneless woman turning butter. What in the hell am I doing wrong with this bad boy?
#2
The thing is, if you're going to use blend animations, you have to set the reference frame to a pose that the character will be at when he starts his blend animation. If you have the reference at frame 0 (the root pose, with arms out?), you will get the crazy arms because it is blending too far.
Maybe this will help: A blend animation does not rotate the bones to the absolute rotational values that you have set keys at. It rotates the bones an amount that is equal to the difference between the value at the reference pose and the value at the key you set.
08/29/2005 (9:11 am)
You seem to have a mild case of don't-understand-how-blend-animations-really-work-itis. Luckily I have the diagnosis copied to my /desktop/stuff.txt for easy copy and paste prescriptions in cases like this:The thing is, if you're going to use blend animations, you have to set the reference frame to a pose that the character will be at when he starts his blend animation. If you have the reference at frame 0 (the root pose, with arms out?), you will get the crazy arms because it is blending too far.
Maybe this will help: A blend animation does not rotate the bones to the absolute rotational values that you have set keys at. It rotates the bones an amount that is equal to the difference between the value at the reference pose and the value at the key you set.
#3
Basically what I need is a sword swing that only works when home girl is in either root, side, back, or forward cycles. If I use cyclic I will have to make her stop and swing as opposed to swinging while running.
And if I understand what you said about blends, If I use blends for it, she will only be able to fire the animation while standing still, or else she will be running then sliding across the floor in a blended idle pose for her swing. Sound about right? Or I will have to create a cycle for run and swing, idle and swing, so on and so forth, and code a bunch of if statements and pull my pubic hair out with my teeth and make a voodoo doll with it. Ect. Is my understanding of this fairly gradeschool?
(don't know if it's obvous yet, but I am a modeler/level designer trying to animate, so yeah, I'm uneducatered)
EDIT: Also is there a simple way to get a cyclic animation to play once, then go back to idle?
08/29/2005 (11:32 am)
So heres a counter question :) If I need this animation to work while she be doin a full body run, would it be better to make the sword swing full body cyclic?Basically what I need is a sword swing that only works when home girl is in either root, side, back, or forward cycles. If I use cyclic I will have to make her stop and swing as opposed to swinging while running.
And if I understand what you said about blends, If I use blends for it, she will only be able to fire the animation while standing still, or else she will be running then sliding across the floor in a blended idle pose for her swing. Sound about right? Or I will have to create a cycle for run and swing, idle and swing, so on and so forth, and code a bunch of if statements and pull my pubic hair out with my teeth and make a voodoo doll with it. Ect. Is my understanding of this fairly gradeschool?
(don't know if it's obvous yet, but I am a modeler/level designer trying to animate, so yeah, I'm uneducatered)
EDIT: Also is there a simple way to get a cyclic animation to play once, then go back to idle?
#4
About your question: What you want is to have multiple animation threads running on your character. You'll have to export the upper-body and lower-body of the run, idle, side, etc animations separately. Normally, you'll play them both at the same time, but when you want the sword swing to happen, you'll override the upperbody-running (or whatever the char. is currently doing) with the upper-body sword-swing animation. make sense?
08/29/2005 (1:05 pm)
First off: LOLAbout your question: What you want is to have multiple animation threads running on your character. You'll have to export the upper-body and lower-body of the run, idle, side, etc animations separately. Normally, you'll play them both at the same time, but when you want the sword swing to happen, you'll override the upperbody-running (or whatever the char. is currently doing) with the upper-body sword-swing animation. make sense?
#5
08/29/2005 (1:14 pm)
Yeah but what I would rather do is have the animations play out in a fable like way like how when you swung your sword in fable, all other animations stopped and you went into a full body swing, you stoped forward motion, dropped down into a stance and did your thing, this would require a full body, which is fine, but thing is, when I do it cyclic it loops on and on until I do something else. So if possible I would like all the animations to be full body, but somehow have the animation play once then stop even though it's cyclic. Any idea at all how one would do that?
#6
08/29/2005 (1:57 pm)
I know this doesn't have anything to do with the question but I have to say funniest headline I have ever read on here LOL.
#7
First, that kind of animation does not have to be cyclic.... you'd have to look into your exporter. There should be an option to turn it off, to make it only play once (I know it's in the sequence marker for the Maya exporter).
Secondly, here is the code that I've used to simply "trigger" an animation. You'd probably have to play with more code to make sure that once this gets called, you have stopped walking forward (I don't know how to do that right now).
@ Jeff :
If you could please continue on the upper and lower explanation I would appreciate it. I AM trying to get a character walking to work with having the lower half being controlled by forward, back, side, etc...
While the bottom is doing it's normal stuff, I want the top half to trigger appropriate animations, like swinging of the arms while running, but then when you push the attack button, the character throws a punch of something. I've searched forever to find exactly how to do this, but so far on luck. If you could add anything at all to this, I'd appreciate it!!
06/14/2007 (11:08 am)
@ Paul : First, that kind of animation does not have to be cyclic.... you'd have to look into your exporter. There should be an option to turn it off, to make it only play once (I know it's in the sequence marker for the Maya exporter).
Secondly, here is the code that I've used to simply "trigger" an animation. You'd probably have to play with more code to make sure that once this gets called, you have stopped walking forward (I don't know how to do that right now).
Quote:
// maps the desired key to your desired sequenced animation
moveMap.bindCmd(keyboard, "x", "commandToServer('playAniml',\"swingSword\");", "");
// function called by your key... don't know why it's needed, but it just works
function serverCmdPlayAniml(%client,%anim)
{
if (isObject(%client.player))
%client.player.playAnimation(%anim);
}
// the function that actually plays whatever animation, note that it is in reference directly to your player object
function Player::playAnimation(%this,%anim)
{
%this.setActionThread("cel"@%anim);
}
@ Jeff :
If you could please continue on the upper and lower explanation I would appreciate it. I AM trying to get a character walking to work with having the lower half being controlled by forward, back, side, etc...
While the bottom is doing it's normal stuff, I want the top half to trigger appropriate animations, like swinging of the arms while running, but then when you push the attack button, the character throws a punch of something. I've searched forever to find exactly how to do this, but so far on luck. If you could add anything at all to this, I'd appreciate it!!
Torque Owner Paul Fassett