Game Development Community

Problems applying animation to several characters.

by Magnus Blikstad · in Artist Corner · 05/06/2005 (5:13 pm) · 15 replies

Hello everyone.

I have a problem here that I really could use some help with or at least some input on as I'm running out of ideas.

First some background information of what I need to do. I have a number of character models, they use the same skeleton layout, but the bones are slightly adjusted to fit each model. Then I also have a number of animations that I need to apply to all of these models.

So far so good, everything exports and loads fine etc so on to the problem.
The problem is actually two fold, I can fix both problems but not at the same time. Fixing one, breaks the other. The first problem I faced was that my finger bones weren't exported (I have two fingers per hand, called Bip01 R Thumb->Bip01 R Thumb B->Bip01 R Finger0Nub and Bip01 R Fingers->Bip01 R Fingers B->Bip01 R Finger1Nub). To fix this problem I turned on "Force Transform Animation". This however produce problem number two; it exports rotational data as well as positional for each bone. When having positional data the resized limbs of a slightly different skeleton will get messed up. I have some images to show the problem.

First we have how it looks when exporting the animation without "Force Transform Animation". The hands are not animated!
www.blikstad.com/skin1.jpg
Then we have what happens with "Force Transform Animation". The arms get stretched out in a very odd way.
www.blikstad.com/skin3.jpg
And last the way it SHOULD look. This was made by applying the animation in 3d studio to the different skeleton, I'd really like to avoid doing this as I would have to export ~50 sets of animation....
www.blikstad.com/skin2.jpg
So, I see two possible solutions to this. Either find a way to ONLY export rotational data for all bones. Or somehow figure out why the fingers aren't exported in the animation.

If there's any more information you need, just let me know.

--
Magnus Blikstad

#1
05/06/2005 (5:34 pm)
The rotational information for your finger bones is not getting exported because it's not changing. The only way I have found to get around this "quirk" of the exporter is to select all the problem bones and animate them rotating very slightly. This way they will be exported.

Another way to do it (that I haven't tried...) might be to pose the fingers how you want them at frame 0. That way it would set the base pose with the fingers flexed, and you would only have to animate them when they changed from that base pose. This method would also result in smaller dsq files and less overhead for the engine, since it wouldn't be thinking about rotating those bones.
#2
05/06/2005 (5:40 pm)
Thank you Jeff!
I'm going to try this right away, I'm pretty sure I have tested it with animations that have the fingers animated though (but now when I think about it, I'm not quite sure =). Positioning the bones in the base mesh sounds like a good idea though.

I'll post again as soon as I've tried it.

--
Magnus Blikstad
#3
05/06/2005 (5:49 pm)
Yes!
Thank you again, making sure there's some keys in the fingers seem to work.... (now I just have to go through all the animations and fix it).

--
Magnus Blikstad
#4
05/06/2005 (6:21 pm)
In the exporter you can make sure everything gets exported by unchecking the collapse transforms option. Or you could add bones you want to export to the always export section of the config file and you wouldn't have to go through adjusting animations.
#5
05/06/2005 (6:22 pm)
In addition to the 'always export' and 'never export' lists in a .cfg, you can also makr bones with 'always animate' (and never animate).. which will force 'animate' them so you don't have to key the bones. Have not used it in a while, but it is worth trying, might save some manual labor.
#6
05/06/2005 (6:28 pm)
@Todd: Already have the collapse transforms off, that doesn't help.

@Joe: yep, there's a NeverAnimate, but as far as I know there's no "AlwaysAnimate". Adding the nodes to AlwaysExport was one of the first things I tried, of course without results.

Actually animating the bones seem to be the only way to fix this. Trust me; I've tried EVERYTHING. I don't ask questions unless I'm _really_ stuck. I'm way too stubborn =)

I'm animating the bones slightly now anyway. Actually, this isn't that much of a problem. I just wrote a script that runs a batch on all the files and add some random keys.
#7
05/07/2005 (10:45 am)
Magnus: Glad I could help. :) That script for adding keys seems like it could be useful to others... any chance of you posting it as a resource?
#8
05/07/2005 (10:51 am)
Crap, my bad, might have been in a version that we used at dynamix. I agree with Jeff, the script would be useful to others in the same situation as you.
#9
05/07/2005 (11:40 am)
Maybe. Right now it's quite specific to my files though, I would have to rewrite it in some slightly more generic way for it to be useful to anyone else.
I have a bunch of other scripts too (for example one that exports all max files in a folder to DSQs), but they all need some cleaning up and right now I don't have an awful lot of time. I'll see what I can do though.

--
Magnus Blikstad
#10
05/07/2005 (5:07 pm)
I've at least cleaned up one of my scripts a bit and posted it as a resource. It lets you export all the max files in a folder to DSQs. Never posted a resource before so I have no idea how long it will take for it to come up on the site. Soon enough I guess. =)

--
Magnus Blikstad
#11
05/09/2005 (9:16 am)
Okay, the problems continue... It's really annoying that you HAVE to have motion in your bones for them to export. In some of my animations my spline bones aren't animated for example (but they're different from the "root" pose... I have two different "root" poses). This makes it all screwed up, why isn't there an AlwaysAnimate option!? Oh well... guess I'll have to make sure I add keys to ALL the bones, sigh.
#12
05/09/2005 (10:12 am)
It makes a lot of sense to why it wouldn't since it would keep the files from bloating and adding a lot of unnecessary information.
#13
05/09/2005 (10:20 am)
Fine... optimizing is one thing, but right now the exporter optimize TOO much, at least for my needs.
The main problem is that the exporter refuse to realize I have a key in the first (and last) frame. Just because there's no motion doesn't have to mean there's no keys. It's a bug if you ask me.

--
Magnus Blikstad
#14
06/02/2005 (1:41 pm)
Magnus: as an update to this issue, I have just found out that it always compares the rotational info to that at frame 0, so if you set up your sequence to start at, say, frame 5, and between frame 0-5 go from the base pose to the beginning-of-the-animation pose, it will register that difference and you will not have to animate the slight changes as mentioned above.
#15
06/02/2005 (2:15 pm)
That's interesting. A bit too late now, but interesting non the less. =)
I'll keep it in mind and try it out sometime in the future when I have to work out new animations (right now for what I'm doing I'm mostly reusing the same animations for a whole bunch of models).