3D Character animation

Discussion in 'Game Development (Technical)' started by Teebird, Jul 25, 2009.

  1. Teebird

    Teebird New Member

    Joined:
    Oct 6, 2007
    Messages:
    80
    Likes Received:
    0
    I'm at the beginning stage of figuring out how to get my 3D game characters to animate, and need a direction to go in.

    I designed a basic human character in Blender, but it's rigid and just slides around on the terrain. The basic functions for my characters are walking, running, and throwing.

    Should I create different poses in Blender, then store the meshes and interpolate between them? Should I attempt to create a system with bone hierarchy and skinning? Can I do it in two months?

    Please give me some opinions.
     
  2. Reactor

    Moderator Original Member Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    1,637
    Likes Received:
    0
    If your character is a mutant creature that can morph into other objects at will, then sure. Otherwise, no ;)

    Typically that is the way you'd do it. In two months, though? I wouldn't think so. It takes years to learn how to animate (decently) and years again to learn how to rig properly. You could use motion capture for the animation, but that also takes time to get working properly, and requires a solid rig for your character as well. (unless you have a pretty costly animation program at your disposal)

    Are you able to throw cash around to solve the problem, or are you looking to get it done for no cost?
     
  3. matibee

    Original Member

    Joined:
    Jul 28, 2004
    Messages:
    95
    Likes Received:
    0
    Q. What 3d game engine are you using? Your own, Blenders ... most have support for animated meshes already, it's just a matter of making sure the mesh is exported in a suitable format.

    Q. Do you need a specific character (ie, a three armed girl in a roman costume with a tail) or a generic one?

    If you're in a hurry search for a stock animated character to use because it's a really, really difficult job to rig and animate an character. Look at the stuff from 3drt.com for example.
     
  4. ionside

    ionside New Member

    Joined:
    Mar 27, 2008
    Messages:
    283
    Likes Received:
    0
    To be honest I've never looked into blender for animation (although I hear it does a good job). You most certainly should rig and skin the character, you could get it done in a few months if you have that time to focus on it, but need to set time aside for testing in your game engine, making sure it works. Surprisingly it's the shaders (textures) that give you the biggest hassle as they require different settings compared to their static mesh counterparts.

    Not sure of the engine you're using (or making your own), but if you are using a rendering engine than it would be wise to find its requirements.

    I'm only assuming you have zero budget and haven't animated before, so here's some general rules that you may or may not know:

    When weighting (skinning), try to keep the vertex weight limit to two bones (4 the max).

    Always created a 'root' bone, also could be called the floor bone, which is used as the parent of all other bones, and you can use this to move your character about the world.

    If your character has walk and run animations, make sure they both start on the same foot (helps with continuity whether you're using blends or not).

    I can't really tell you how to animate, and it sounds like you don't really have time to learn, but once you've got your character rigged and weighted, block out your animations across the timeline... very rough... and keep your keyframes as limited at possible. An example for a walk:
    make your timeline 30 frames
    set your first pose on frame 0, and the same pose on frame 30
    set a 'mirrored' pose on frame 15
    Now this is your primitive blocked out animation. Next step is to go over it in various passes until you're happy with it. Making sure the hands are moving opposite to the feet (common problem I see, called 'square-gating'). the hips move up and down, side to side, but not forward and back.

    Hmm, I know the above really isn't enough information and there's probably some really important tips that I can't think of, but I hope there's something in there that helps you out.

    Wish you the best!
     
  5. zoombapup

    Moderator Original Member

    Joined:
    Nov 25, 2004
    Messages:
    2,890
    Likes Received:
    0
    Why not license a character with similar animations to youre requirements rather than doing the art yourself? There are plenty of pre-made characters out there, might not be exactly your character, but would get you something working that wasnt sliding, then you could finish the game programming part of it and hire/find an artist to redo the graphics later.

    I'd recommend looking at D3D's animation support, particularly for skinned characters. You could also look at Havok animation if you dont mind being bound to PC only. But it really depends on your engine and file formats it supports. I'd also recommend looking at Horde3D because it supports collada animations pretty damn well.
     
  6. vjvj

    Indie Author

    Joined:
    Sep 25, 2004
    Messages:
    1,732
    Likes Received:
    0
    Bone hierarchy and skinning is the way to go for most animations, like walking/running/throwing :) Blending between mesh poses is usually only used for facial animation and Terminator 2-style morphing, mostly because it's more expensive in terms of storage and it looks like crap without lots of tweaking.

    BTW, I'm not entirely clear on where you are coming from... Are you an artist wondering what the standard methods are for this kinda thing?

    ionside knows what he's doing with regards to 3D animation and made some very good points, so make sure to take that all in as well...
     
  7. xelanoimis

    Original Member

    Joined:
    Apr 25, 2005
    Messages:
    126
    Likes Received:
    0
    If you use a 3rd party engine check it's doc and examples. Most engines that support 3d animation, support skinning animation (and some support morph too, or even both at once).

    If you're a programmer wanting 3d character animation support in your own engine, then the skinning technique is also recommended. You can implement the skinning on cpu or on gpu with shaders (faster). And if you don't loose yourself in technical details (like multiple animations blended at once, morphing etc) and keep it simple I think it is doable in 2 months. Depending on your skills, documentation, etc. I spent about that on my models/anim system, but I didn't know some important details about how skinning works. Now I could write the code in less than a week.

    For 3D models support, I recommend using your own model format and write an exporter from max or other 3d editor. Or you can check the Assimp library which lets you write a converting tool, from various model formats to a format of your own. Including skinned animations.
     
  8. Teebird

    Teebird New Member

    Joined:
    Oct 6, 2007
    Messages:
    80
    Likes Received:
    0
    Thanks for the support. After reading your responses, I've decided to do my character animation using Blender. I will build the character meshes in Blender (I have one so far) and insert an armature system. Then I can experiment with poses and movement in Blender, and export the elements needed to animate the characters in my game. That's all I know so far because I don't know what kind of details I can export from Blender.

    To animate characters in my game, I need:

    1. the position of each joint and vertex
    2. the angle (matrix) of each bone
    3. a hierarchy of joints and bones
    4. vertices that are affected by each joint/bone-angle
    5. texture UV coordinates for each vertex

    Has anyone done any exporting of 3D characters from Blender?
     
  9. xelanoimis

    Original Member

    Joined:
    Apr 25, 2005
    Messages:
    126
    Likes Received:
    0
    You also need the skinning pose - the position and rotation of each bone when the skinning was applied.

    It is part of the skinning formula, along with the current bone transformation: vertexes are transformed from model space to bone space (by this inverse matrix) and then to world space (by the current bone's world transformation, that is local bone transformation (got from animation) multiplied by the parent's world transformation).

    This is the basic idea for the skinning formula. Take care of your matrix multiplying order.

    For a character the skinning pose is usually with the hands (and legs) spread, while the default pose can be an idle pose. This skinning pose can be the same as the default model pose, but for a lot of models I found, it is different. Most model formats include it as separate info.
     
  10. Teebird

    Teebird New Member

    Joined:
    Oct 6, 2007
    Messages:
    80
    Likes Received:
    0
    Okay. I plan on exporting the set of poses needed in a walking/running/throwing/etc. sequence. Then I will interpolate the joint/bone angles to get some smooth character movement. Rather than interpolating whole meshes. Is that what you mean? I'm not sure.
     
  11. gun0007

    gun0007 New Member

    Joined:
    Jul 13, 2012
    Messages:
    8
    Likes Received:
    0
  12. Nexic

    Indie Author

    Joined:
    Nov 5, 2004
    Messages:
    2,437
    Likes Received:
    0
    Might want to have a look a mixamo.com. You can use their tools to auto-rig your character quite easily. You can then buy mo-cap animations from their site and apply them to that character. I'm not sure of the quality of the rigging, but it might be worth a shot.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer