Animating a new weapon, and other modeling questions


(jet Pilot) #1

So far most of the modeling tutorials I’ve been able to find online are for player models, but I’m working on weapons right now. I’ve managed to get my weapons into the game, both 3rd person and 1st person models. However, the models are quite static.
I’ve got no problem doing the animation in 3ds, but I’m not too sure about which frames need to be which actions, or about playing those animations at the appropriate time.

I’ve imported the models using Milkshape and nPherno’s MD3 tool, but it only seems to have one frame of animation, I cant find where to get the full animation. (If I had this, I’d not have as many questions here!)

now about tags.
In the 1st person view, where would tag_weapon need to be? In the mg42 model, it’s set above the gun, but in the garand model, it’s set on the handle. What difference does it make in the 1st person view? I understand it’s importance in 3rd person, but is it even necessary in 1st?

Can I name tags whatever I want to, as long as they correspong between models to be connected?


(No1_sonuk) #2

Milkshape can only import frame 0 of MD3 or MDC models, mainly because MS3D doesn’t do vertex animation, so that’s your problem there - use 3DSMax or GMax. Plus, what is this fascination with nPherno’s MD3 tool? I’ve never seen the need for it myself.
Secondly, only the whatever_hand.md3 models have animations anyway. They’re the tags used to attach the parts of the gun and the hands. The tags are moved around, and drag the static parts with them, creating the “illusion” of an animated weapon.

tag_weapon, tag_flash, and tag_brass are the only ones you have to have, any others can be whatever you like as long as it’s tag_*.

Also, in ET (but not Q3 or RtCW), the static gun-parts models (called barrel.md3 in the stock ET files) can be called what you like too. You just need to enter the proper filenames in the .weap file.


(jet Pilot) #3

Thank’s a lot, No1_sonuk. That clears up a bunch.

For some reason, when I export from 3ds, no tags are exported, just the model meshes.
Afterwords, I import into Milkshape, cause the 3ds exporter I have doesn’t work with a .qc file (as far as i can tell)
Finally, I import with nPherno’s tool, then import tags from another model, positioning them within nPherno’s tool.

Which 3ds version are you using? I’m using max 6, but I’ve only found one exporter, and it’s a bit limited. If you’re using max 6, I’d be extremely grateful for a link to the exporter you’re using!

Do the animation frame numbers make a difference? or does it all depend on how I set up my weapon.cfg file?


(Jaquboss) #4

Or just simply code using vertex animation to all and do it like in TCE


(No1_sonuk) #5

Do the animation frame numbers make a difference? or does it all depend on how I set up my weapon.cfg file?

You can use any frame numbers you like - just put the numbers in the weapon.cfg file.

I’m using Max 5.
WRT Milkshape:
To begin with, I made the static model in Milkshape (easier to keep the poly count down IMO) then exported as a single-frame 3ds file. Import into Max and add the tags and animate in max - it’s easier to get it right that way.

The big problem with MS3D is that it WONT do vertex animation, that’s why your .qc import won’t work. The .qc files are for export to MD3. If you do use MS3D to export an animated model, it will work (I use it sometimes for map models), but it’ll be a pain to fix things that are wrong. In Max, you put a camera at 0,0,0 with a FOV of 90 degrees, and that’s pretty much the in-game view - There’s no facility like that in MS3D, and I doubt there will be until MS3D2 comes out (no ETA on that AFAIK).

Look here for an idea of how to use MS3D for animation:
http://www.paposo.com

I would, however, recommed against using it for weapons animation.

BTW, the Max importers for MD3 and MDC do import and display the tags properly.

Or just simply code using vertex animation to all and do it like in TCE

It’s not quite as simple as it sounds.


(Jaquboss) #6

I know, but coding simple is…


(jet Pilot) #7

Thanks, both of you. I’m using Max 6, and there’s no md3 importer that I can find.
Tags are my current problem, MS3D wont import or display them properly, 3ds WILL export them, but they wont display in nPherno’s compiler, and they are rotated incorrectly in game.

what is the best dimensions to use for a tag? All of the tuts I’ve found say to have
right angle on the pivot
longer edge pointing to the +z axis
shorter edge pointing in the -x axis
im sure this isnt right since 3ds uses the z axis as elevation (up/down) and my weapon is horizontal. I just want my tags to show up in my other tools!

Whn animating the tags (the slide on the shotgun, for example), is it best to put the slide in a separate file with a tag_slide (with only one frame) and animate the tag on the primary model?


(No1_sonuk) #8

dunno - i resisted the temptation to go to Max 6 because I knew 5 worked, and that there were no MD3 tools for it at the time.
BTW, I have never had need of nPherno’s compiler. What do you use it for?


(jet Pilot) #9

I use it to define the shader paths for my models. Otherwise they show up with the default black/orange ‘halloween’ texture.

Also, how do I get my 3rd person model to be held in both hands?
If I replace an existing weapon model with mine, it looks fine, but if I add it an another weapon, he hold it like it’s a pistol, and the player’s animation is messed up.


(nUllSkillZ) #10

Did you look at “animations/scripts/human_base.script”?
I think that file controls how the weapns are held.
And if the weapon doesn’t exist it’s treated a default way (pistol).


(No1_sonuk) #11

I use it to define the shader paths for my models. Otherwise they show up with the default black/orange ‘halloween’ texture.

OK. I use Max to do it…
You rename the top level of the Max material to your shader name (something like “models/weapons/pop/mp40.tga”), and the exporter writes that info into the MD3’s shaderpath info.

WRT your 3rd person weapon problem, I can only assume (as nullskillz suggested) that you’ve assigned your new weapon to the wrong class in your code.


(Jaquboss) #12

ah you dont need to specify extension in shader path, maybe you shouldnt do that…
edit: for animation problem, as it was said that animation script needs to be modifed…
use weapon pickup name…
Also it doesnt look like pistol but like syringe :chef: IMO
EDIT2: 1st person animations are done like this:
main v_model has all not moving parts , and no animations
v_model_barrels has its model and its tag ( put the model in cetre of scene ) and no animations
v_model_hand has ALL tags and the tags are animated, no model there
3rd person doesnt have any animations at all…


(jet Pilot) #13

Thanks so much, both of you! Got it workin, finally. No more terminator one handed guns!
It never occured to me that I’d need to muck about with human_base.script