Jump to content

Model animations for weapons


Recommended Posts

Does anyone know if it is possible to animate weapon models?

 

I was looking at an world of warcraft weapon that have an animation in it, and I would love to learn how to make it the same way in JKA. Perhaps someone know of a weapon that is already made that do this? All help appreciated. :)

Link to comment
  • 2 weeks later...

The MD3 format uses vertex animation, and saves several 'frames' which are used for animations.

I haven't looked at how to export an MD3 with several frames, or how it would be created.

 

These commands are useful for debugging:

=============================================================================

MODEL TESTING

The viewthing and gun positioning tools from Q2 have been integrated and
enhanced into a single model testing facility.

Model viewing can begin with either "testmodel <modelname>" or "testgun <modelname>".

The names must be the full pathname after the basedir, like
"models/weapons/v_launch/tris.md3" or "players/male/tris.md3"

Testmodel will create a fake entity 100 units in front of the current view
position, directly facing the viewer. It will remain immobile, so you can
move around it to view it from different angles.

Testgun will cause the model to follow the player around and supress the real
view weapon model. The default frame 0 of most guns is completely off screen,
so you will probably have to cycle a couple frames to see it.

"nextframe", "prevframe", "nextskin", and "prevskin" commands will change the
frame or skin of the testmodel. These are bound to F5, F6, F7, and F8 in
q3default.cfg.

If a gun is being tested, the "gun_x", "gun_y", and "gun_z" variables will let
you adjust the positioning.

Note that none of the model testing features update while the game is paused, so
it may be convenient to test with deathmatch set to 1 so that bringing down the
console doesn't pause the game.

=============================================================================

// ...

{ "testgun", CG_TestGun_f },
{ "testmodel", CG_TestModel_f },
{ "nextframe", CG_TestModelNextFrame_f },
{ "prevframe", CG_TestModelPrevFrame_f },
{ "nextskin", CG_TestModelNextSkin_f },
{ "prevskin", CG_TestModelPrevSkin_f },

 

I'll be using animated MD3s for my "q3pro" mod, but I'm focusing on the code first (aka I'm a terrible artist and you should do it for me)

The MD3 weapons in base are animated too - the Flechette's barrel model for example.

Link to comment

The hand model of guns are what map the animation from third person to the first person animation. Using _barrel models, one can change the position of these things. Unfortunately, you can't do anything fancy like scaling, and the first person gun animation's framecount is exactly the same as the frame count of the third person animation. Also, without fancy weapon hacks (or my Smoothened Weapon Animations) the animations won't be really smooth at all.

Link to comment

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
×
×
  • Create New...