Game Development Community

Character Animation Woes (please help)

by CMA · in Artist Corner · 05/29/2009 (7:46 am) · 3 replies

Hello!

My team and I are currently working with the TGEA demo while we await the purchase of the current torque engine. I've managed to get characters in game, but there's one issue when I have them use the default torque animations. My characters float a little off the ground. Upon further investigation it seems that torque is not using the bounding boxes I've made in 3ds max, but redrawing the character's bounding box. When it redraws that bounding box it's positioning the character in it incorrectly. Hence the floating effect. I've noticed in the player.cs in the .../server/scripts/players/ has a line of code defining the bounding box, but when I edit this or comment it out, I still have the same problem. Is it taking the bounds information from the dsq files and is that what might be causing this?

img5.imageshack.us/img5/6421/characterhelp1.jpg
Upon searching for a solution, I've found that people with similar issues end up creating their own animation dsq's and end up having everything working fine. Since I'd need my own animations eventually I set out to make my own as a solution to the above problem. I don't know what's going wrong but when I implement my own dsq's, I get some sort of terrible deformation instead of my animation (see picture below).

img5.imageshack.us/img5/5703/characterhelp2.jpg
I've read all the documentation, tutorials, and forum posts that I can find on character animation, but I'm still stuck on this one.

-If anyone could help me figure out the floating issue that'd be a good temporary fix
-If anyone could lend me a dsq, and a corresponding max file, and config file to study I'd greatly appreciate it
-If anyone could help me figure out where my own .dsq's are going wrong then I'd be in your debt.

Thanks!

About the author

Recent Threads


#1
05/29/2009 (8:07 am)
The "Bounding Box" that you see defined in the server-side player.cs actually deals with the Box collision mesh/shape that Torque draws and uses for the players collision in the game world. The box is drawn from the pivot point of your "Bounds" shape that you define in your 3D DCC app.

The "bounds" position held in each DSQ can/will offset the mesh if things are not aligned correct. The basic rule of thumb if you are going to rely on the default DSQs is to not adjust any of the values of the biped (ie. height or adjust bone lengths, repositioning it is fine) as height changes can sometimes affect the models. My guess from your screenshots is that this is exactly what you did and the system is trying to reposition the bones as best it can to fit (BTW I think your character is a bit too small).

Generally speaking unless you setup your character model to use the exact same rig (with few if any modifications) the only time you should try to share DSQs is with blends since they dont give a dammed about bone lengths and scales, just relative transform data. If you plan on sharing all your DSQs (or using the default ones) then you will have to make all the models use the exact same rigs like they did in Tribes 2. Personally I just save all the bip data out for my animations and do a quick export out for all the non-blend animations that a particular mesh needs.

With regards to your own DSQ issues. Are you perhaps culling out a shape or two with a CFG file? Or perhaps your world scale is not set correctly in 3DS Max? Did you scale the entire biped shape itself up/down outside? It looks to me like data is being omitted or adjusted incorrectly.

Also a great place to check your art to see that it works is in TST Pro, it comes with every license of the engine so go harass your programmers for it as it will make things much easier to check your art without having to go in-game all the time.

Oh and in the future if you can, please use the image tags as it makes things much simpler for the person trying to help you.
#2
05/29/2009 (9:31 am)
I'll just have to be patient as TST Pro doesn't come with the demo.

I'll model up a quick character and rig it with the TorqueOrc rig and see how well that works.

As far as my own dsq exporting is concerned I've tried setting up my config file a few different ways. I've tried to have it export all biped objects except Bip01, and have had it cull everything but the hips down (for a walk animation). For my config files I pretty much used the one that comes with the TorqueOrc. An example of the cfg you use would be helpful to see.

The biped wasn't scaled, but I did use the "Rescale World Units" utility. Perhaps that has something to do with all this mess.

Thanks for the quick response, I have some new options to explore :) , and some re-rigging to do :(

I'll keep you posted if it works or not.
#3
05/29/2009 (11:03 am)
Update:

The floating issue is a scale issue. I modeled a quick character, and rigged it to the TorqueOrc's biped. It works perfectly (well actualy the fall animation is a bit funky, but thats not important for my purposes at the moment)

Now to see if I can get my own dsq's exporting properly....