Sign in to follow this  
d000hg

Animating very simple character models

Recommended Posts

Lately I've been looking into the D3DX animation support for hierachical and boned animation, since my RTS game is going to require people to walk/run/fall over etc. It seems that I can quite easily load and run an animation for a character by hacking the sample code for instance. However since this is an RTS with a high isometric view, units can be very low-poly and still look fine (think C&C style or Total Annhilation). For people I don't know low you can go though - it seems I can probably dispense with using boned/skinned animation althogether and simply have each limb as a few triangles, a bit like in older 3D games. For such simple models I don't know if that makes writing my own animation stuff much easier though - since many units can be on-screen it can't be too processor-intensive. I actually think most of the work to implement such simple animation myself would be writing a loader for .3ds/maya/X files which are quite complex. I'd go with the D3DX utilities though except I don't believe I can blend between different animations (In DX8.1). If a character is walking and wants to run, then over some time the animation should blend between RUN & WALK. Similarly if a a running character is killed and so on. I believe this can be done imilar to how skinning blends between matrices - each bone's matrix can first be pre-blended from 2 the different animations in use. Can anyone offer suggestions, advice and resources about animation in this case or in general? Many thanks.

Share this post


Link to post
Share on other sites
This maybe useful, as this tute teaches animation blending...

for the low-poly thing.... I think you might want to look at Progressive LOD (level of detail)... might want to look at the ProgressiveMesh sample... but I'm not sure if its included in DX8.1 tho...

hope this gives you some pointers

Share this post


Link to post
Share on other sites
I've already got that, it talks enticingly of multplie animation 'tracks', but unfortuanately as a feature of the 2003 Summer (DX9) update.

Progressive meshes allow you to display high & low detail versions of the same mesh, blending the LOD smoothly, wheras I think I want only a very low LOD. Otherwise the memory use is going to be pretty high!

I think for the kind of view distance I want (and bearing in mind this is for 4E4 so development speed > *), we could get awaw with each part of the character mesh as a box - long and narrow for limbs, square for head etc. At 12 tris per box a model with...
  • (Lower + Upper Leg)*2

  • (Lower + Upper Arm)*2

  • (Lower + Upper Body)*2

  • Head

  • ...gives 13 boxes and 156 polys, which is about as crappy as you can get to animate a person with IMO (unless you have the body as one unit).

    For what is essentially a special case of an animation, I just wonder if I can write a simple animation set-up that has some big advantages over D3DX. The only problem is loading the animation data in the first place.
    Is this something that Maya etc can be made to do - model extremely low detail non-skinned models and output a very simple custom file format?

    Does anyone have some tuts on general animation and blending different animations together by any chance?

    Share this post


    Link to post
    Share on other sites
    I think what you're actually doing (a contest entry quickly and easily) is the direct opposite of what you're asking; a custom file format and blending animations. Why not use a tried and true format like .md2 or .ms3d that gives you animation then simply work within the constraint of having to complete an animation before starting another?

    Or, get you're game to a playable state then work on these 'extras'. Good luck!

    Share this post


    Link to post
    Share on other sites
    This man speaks the truth. The last thing you want to do if you're looking for a simple means to load, animate, and render models is to create a custom file format. By using a pre-created format you may lose a bit of that extra customizability that a custom format may offer, but at least that format will have tools that support it, along with a decent amount of documentation (depending on the format; MD2 and MD3s, for example, have very good documentation).

    If you're looking for something with a bit more customizability, the MS3D format (Milkshape3D) is very simple to deal with and it supports skeletal animation.

    Share this post


    Link to post
    Share on other sites
    If you really want to do skeletal animation, chances are you will need to know what's going on under the hood. I would look at the BVH loaders at http://bioviewer.sourceforge.net/ and http://bvhviewer.sourceforge.net/. They have helped me in my skeletal animation engine.

    Mike C.
    http://www.coolgroups.com/zoomer

    Share this post


    Link to post
    Share on other sites
    I now understand the basics of the maths and bone blending, and I did briefly work on the animation system at a game developer. However that was an AAA-standard system they'd written years back using custom data...

    Isn't loading MDx fils a bit of work? Or are there some free libraries for this kind of thing?

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    Sign in to follow this