Two Weapons, One XMODEL
File description
COD:BO Olympia O/U Shotgun
and
COD:WAW Sawed-Off Double Barrel Shotgun
Nothing too exciting about these two models, they have been available for a long time. The difference here is that I am only using one XMODEL for the two weapons. The XMODEL limit is a constant problem, so I've been experimenting with ways to use less.
This release is fully functional, but is intended mostly as a proof-of-concept and demo on how to make your own combined models.
Included in the .zip is the Maya file and xmodel.export so you can experiment with a working example. The main problem with copy/pasting two models together is duplicate joint names. You can rename them in Maya, but then the animations don't work anymore.
Using a HEX editor (not notepad!) you can change the joint names to something different with the same number of letters, then match it in Maya. In this example, the "j_gun" for the sawed-off has been changed to "x_gun" in the XANIM files and Maya. "tag_flash" is now "tag_flasx". These two models didn't have any other duplicate names, so it was an easy experiment.
All animations work correctly now. Both weapons being break-action shotguns is just a coincidence, I was picking simple models. Should work with any type of animation.
The hierarchy for the meshes isn't critical, as long as everything is bound to the right joints. However, there must be a "j_gun" at the top of the joints. The game uses that to put the gun in your hands. The other "x_gun" joint must be attached somewhere under "j_gun".
Now you have a model with both weapons. The extra surfaces must be hidden using the "hideTags" in the weapon file. COD4 only lets you hide a maximum of eight tags, so this method won't work well with complicated models with lots of attachments.
Unfortunately, there is no way (that I'm aware of) to hide parts on third-person models, so they still need separate XMODELs.
Hopefully, this will help someone save a XMODEL and squeeze a few extra weapons into their mod.
Comments
Post comment
ONLY USERS CAN POST COMMENTS.