Sign in to follow this  
almondega

Best way to hold a weapon using dynamic Arm/Hands with armatures

Recommended Posts

hi, i'm developing a fps engine game and now i'm coding the arm/hands animation and i'm new here x) i these current fps games, i see that the character and the player hold the weapon dynamicly, i mean, for each weapon, the player holds the weapon in a different way, reload, animate and this stuffs so, my idea was to create a arm with the bones ready to be movimented on-the-fly this is the arm model screen shot: then, i create a ArmManager class, witch modifies a struct called bone, with informations like target_angle to increase or decrease the bone to a position and a EventManager, to send to the ArmManager class a sequence of bone moviments like: sec 1: bone 1 rotate y 30 degrees sec 2: bone 2 rotate x 10 degrees (finger 1) sec 2: bone 3 rotate x 10 degrees (finger 2, all on same time) the question is there are a good technical to moviment bones on the fly in a fps style? (hold weapon, reload) or theses modern fps games just do a pre-animated arm model for each weapon ? here is a screenshot of my fps engine using Ogre3D + PhysX

Share this post


Link to post
Share on other sites
Preanimated. Some sort of real time 3d hand animator seems like a giant waste of cpu time when it looks just as good to preanimate it. If its variance your after, get a bunch of preanimated reloads etc. up, and randomly cycle through them.

Share this post


Link to post
Share on other sites
it's not uncommon to use inverse kinematics to avoid weapons clipping through walls and such. But for weapon anims (reload, aiming...), they are pre-animated.

Source (HL2, Counterstrike) uses inverse kinematics for character feet (not sure about weapons). If you play HL2 episode 2, you can notice it when enemies walk up staircases, or when Alix jumps into the car.

IK complements forward kinematics (pre-computed animations) to give it a more natural feel (keep feets on the ground, clipping, ...).

Share this post


Link to post
Share on other sites
so, this is IK
i search now about it, blender does have it right? that IK options for bones, witch a child bone define the parent bone position and orientation

and FK, that a desired position for a determined bone, u calculate all the bones to reach that position.. amazing x)

Share this post


Link to post
Share on other sites
It's the opposite actually. Inverse kinematic applies a set of constraints (target position and orientation for the bone), and tries to satisfy the constraint, Forward Kinematic is the standard animation procedure, that modelling packages have.

Usually, animations are precomputed (key frames), and interpolation takes place to convert an keyframed animation into a smooth movement (animations could be recorded at 10 frames per second for example). The transition from one anim to another is also usually a blending procedure.

Animations systems can be quite complex. For a character, you have to consider many factors. Which way his feet are moving, how fast, is he looking up, crouching, walking, been shot (procedural ragdoll animscan be used for twitch animation blending and giving more life to the character), aiming, special anims (reloading, death anims, taunts), constraints (for inverse kinematics, for example, using a machine gun on a jeep)...


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