View Full Version : Propotioning weapons in milkshape
berzerker8x
03-14-2003, 05:07 PM
Hi everybody,
I recently got into the whole making models thing for MP.. I made a simple handgun and skinnned but now i ran into a problem. I can't seem to figure out how to scale thr gun in proportion to Max, and know which direction the gun must face in order for the model to be correct... I also can't figure out how slides work on guns when they fire??.. images/icons/confused.gif
If someone could help me that'd be mroe than great!!! This stuff is confusing me images/icons/tongue.gif ..
thanks
berzerker8x
03-14-2003, 08:20 PM
oh, when I meant I didn't know how the slides work. I mean: Do I have to animate the weapon in Milkshape before exporting it?.... I'm really not sure if I have all the requirements... I couldn't find any tutorials anywher either.... help is appreicated, thank you.
LJHalfbreed
03-14-2003, 08:44 PM
I'm running into a similar situation... seems as though stuff goes weird through Milkshape. Some sort of mirroring effect.
To help out immediately, you need to search these forums for what you're looking for, such as:
http://forums.3drealms.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=18;t=000918
Basically, if you make a weapon move, you have to export *everything* correctly, and some of the exports are combinations of bones, meshes, and animations. I'm working on figuring out the correct procedure (has to be done with 3dsMax... sorry all Milkshape users!). Anyhoo... when I get done I'll make up a tutorial.
-LJ
Akari
03-14-2003, 09:44 PM
Just export one of the games guns like the Beretta and save it as 3ds. Now go to Max4 and import it, and replace the scene completly. Now Import you gun and click Merge with scene. Now allign you weapon to the other one, texture it and export to kf2.
berzerker8x
03-15-2003, 10:29 AM
Hi,
thanks, I'll hav a read through it and maybe reinstall my 3DSMAX.... This looks like it will be a pain in the butt... oh wel....
Halfbreed, let me know once you figure it out images/icons/smile.gif
As for propotioning I'll take your advice akari...
Since I made stuff in Milkshape, is there a way I can bring my model to 3dsmax without having to make a new one entirely *crosses fingers... images/icons/frown.gif
LJHalfbreed
03-15-2003, 11:16 AM
Well, here are my current finds:
If you look at most of the weapons, you'll see these files in kf2 format (substitute 'weapon' for the weapons name):
weapon_default
weapon_levelitem
weapon_lod0
Weapon_lod1
weapon_reload
weapon_ricochet
weapon_shoot
weapon_weapontoprojectile
For starters, lod0 and lod1 are distance related. The higer the number, the farther away it's seen. What this basically does is allow people who are far away and firing at Max to use 'smaller poly' weapons. Meaning, they won't animate and suck up PC power.
lod0, lod1, and Level_item all need to be exported with animation, textures, and meshes. Everything else is just animations.
My advice? Turn your meshes into 'bones' through 3dsMax. Select Mesh->rightclick->properties->bone on/off. It makes things much easier this way.
A few points of note: Use MS3d to open each of the kf2's of some un-modded weapon. Open them one at a time and see what is being used. From that standpoint, export your weapon in the same way. Oh, and use the same amount of frames too, or you get Index 0 errors all over. (Those are usually related to the weapontoprojectile and the ricochet files)
If you get an 'Index 0' error message about frames, I *think* that means that there is supposed to be an actual animation taking place. You really have to check and see what it looks like in ms3d (the kf2) so you know how to properly animate your new gun within MP and export correctly.
As for moving stuff from MS3d to 3dsM, export your milkshape thing in 'autodesk .3ds' format. Then, import it into 3dsm. Make sure you edit your units for CM and whatnot, otherwise, your gun will be all jacked up... either exported as mm (itty bitty!) or exported as meters (SO FRICKIN HUGE! Heh... I got screenies somewhere)
-LJ
PS. The only problem I'm running into now is trying to figure out when the actual reload animation is triggered during the reloading, and if the weapon reload anim is in any way directly related to it's character reload anim. (I have a revolver that looks great but is using most of the beretta animations... I'm wondering if that's the problem...)
Akari
03-15-2003, 03:03 PM
Weapons need bones cause in order for the slider to move back like in real life it has to be animated. Oddly though, you can't see the animations in MS3D unlike the human models. This could be cause we don't have a widepose.kf2 animation for the guns, because you can only view them ONCE you import the widepose animation then you import the true animation.
Anymore questions just ask...
Akari Kitachi
LJHalfbreed
03-15-2003, 08:05 PM
Well, I'm still working out the kinks in this tutorial, and since I can't figure out why I can get the entire frickin' model to animate EXCEPT that stupid cylinder rotating out from the stupid frame.
Lets see here...
This is what I know, using the beretta as a 'base' for my theories.
LevelItem, LOD0 and LOD1 are all exported with animation, textures and meshes checked. All three need 30 frames of animation AVAILABLE, but nothing needs to be keyframed.
default and ricochet get exported with just animation checked. Default has 31 frames, with no keyframes used. Ricochet has 6 frames, no keyframes used.
Reload, Shoot, and weapontoprojectile are exported with just animation checked. Reload has 31 frames, and has keyframes being used (like for chambers opening, empty clips being 'fired', etc...) Shoot is only 5 frames, and includes all the hammer-falling and whatnot. Weaponto projectile is the most confusing. It's just 11 frames, and the whole gun moves forward on the 'x' axis, in the direction of the barrel.
Exporting everything using those values as a basis gives you a perfect in-game weapon. You won't get any animation errors unless your coding for the txt and h files is messed up. Unfortunately, I haven't figured out the reload portion yet, because my cylinder refuses to 'roll out' from the frame to fit in with the character animation. I *think* there might be some sort of limits on how it's supposed to animate, but I haven't figured it out yet.
Hope that helps out some.
-LJ
berzerker8x
03-15-2003, 09:36 PM
Hey guys,
thanks a lot again. I had to go out for the day so I'm just reading through your replies and stuff.. I'll have a full reply soon...
thanks
berzerker8x
03-15-2003, 09:39 PM
Originally posted by Akari:
Weapons need bones cause in order for the slider to move back like in real life it has to be animated. Oddly though, you can't see the animations in MS3D unlike the human models. This could be cause we don't have a widepose.kf2 animation for the guns, because you can only view them ONCE you import the widepose animation then you import the true animation.
Akari Kitachi <font size="2" face="Verdana, Arial">Hey Akari, where can I find the widepost? I browsed around the data ras but i couldn't find it. Thanks
Akari
03-15-2003, 09:43 PM
Look in:
data/database/skeletons/default_skeleton/anim/widepose.kf2
It will be at the bottom if you have the files sorted by name.
This is used for the human models though. But I may be wrong. Try it with the guns.
berzerker8x
03-15-2003, 09:47 PM
Originally posted by LJHalfbreed:
Reload, Shoot, and weapontoprojectile are exported with just animation checked. Reload has 31 frames, and has keyframes being used (like for chambers opening, empty clips being 'fired', etc...) Shoot is only 5 frames, and includes all the hammer-falling and whatnot. Weaponto projectile is the most confusing. It's just 11 frames, and the whole gun moves forward on the 'x' axis, in the direction of the barrel.
Exporting everything using those values as a basis gives you a perfect in-game weapon. You won't get any animation errors unless your coding for the txt and h files is messed up. Unfortunately, I haven't figured out the reload portion yet, because my cylinder refuses to 'roll out' from the frame to fit in with the character animation. I *think* there might be some sort of limits on how it's supposed to animate, but I haven't figured it out yet.
Hope that helps out some.
-LJ <font size="2" face="Verdana, Arial">I think I have an idea about the weapon as projectile thing. It's moving in the X axis, maybe because when max drops the wepaon it flies away from him and lands on the ground.. this is a guess..
As for the weapon frames. I actually opened up the ultimate mod to see how he did the weapons, and he only had 3 models, for example: colt, colt_bang, colt_levelitem. But the gun's action moves and stuff ingame..
I also took a look at the textfile and other files, and it seems that if i model say a chamber, it can be ejected using this line:
[Message] Frame = 1; String = "this->P_CreateProjectile ( shellname, 1 );";
and that's found in the weapon.txt
I was thinking.. with a shotgun, max shoots it then pumps it after each shot... theoretically I would have to make an animation for the shotgun to pump near the end of the firing animation, hmmm.... images/icons/confused.gif
But before I do any of this I should really learn how to animate something in MS3d... images/icons/frown.gif
i'm taking this very slowly, I've only been using this program for 3 days.. the modelling part is coming to me naturally, but this other stuff is fuzzy. thanks for being so nice guys. I know some other people (not here in this forum) like to flame me for being new...
Thanks.
berzerker8x
03-15-2003, 09:50 PM
akari,
yeh the thing imported but the joints are all jumbled together.. must be that dreaded problem with imported items and how the things are connected...
I'll try and see if I find a weapons one.
berzerker8x
03-15-2003, 10:04 PM
Here's the models worked on.
I made the mp last night and skinned it today in the morning. I'll try to bring the mp5 into the game as it is. I dunno if it needs joints or anything to function. But I'm sure it doesn't need any animations of it moving. I don't plan on the gun to move when it fires anyways.
http://berzerker8x.hypermart.net/my_models/
I'm gonna be making a mossberg 590 compact cruiser tonight. (shotgun).. I think I have become addicted to making the models... I guess I will be even more once I get them into the game images/icons/grin.gif
LJHalfbreed
03-15-2003, 11:34 PM
Bah... I need some webspace...
Okay... to explain my problem a bit better, you have to think of how a revolver works. In newer wheelguns, the cylinder will rotate out-and-away from the frame when you need to reload. Then there's a cartridge release/puller which helps pop out the spent shells. Then, you can either hand load (slow) or use a quickloader (hella-fast... push, twist, and you're done) to reload. Then, you can either push or snap-twist your wrist to lock the cylinder back into the frame. Then, your weapon is ready to fire again.
What's puzzling me is the reload animation. I have it set up where the cylinder rotates out from the frame to allow for the 'reload' to happen. I'm using the M79 animation so he tilts the weapon up, letting the shells fall out. Then, he brings the weapon back down, reloads, and 'snaps' it shut.
The thing that's not working is the cylinder rollout.... not even for a second. I made the entire animation keyframed for an open cylinder (31 frames, no less) and still, the game refuses to do that animation.
I originally thought that there might be a naming problem or something, but I realized that the hammer falls/raises during the shoot animation.
I have no problems making spent shells fall out of the gun, just making the cylinder rotate out and away from the frame. I'm wondering if the game refuses to allow animations that rotate on that particular axis or something. Next thing I'm going to try is saving the entire animation with no keyframes, but with the cylinder pre-rotated for the entire animation.
And that's it for that explanation...
As for the issues with weapons, use 3dsMax. Within 3dsMax, you can turn the actual pieces of mesh into bones themselves, and therefore don't need to worry about the game hiccuping on your homemade kf2's. It works great (except for the stupid reload).
Just letting you guys know.
-LJ
berzerker8x
03-15-2003, 11:45 PM
ahh i c, that must be bothering the crap outta ya. images/icons/frown.gif I remember reading that rotate animations don't work for MS3d, but I don't know if that is the case with 3dsmax.
I will try and bring the stuff to 3dsmax. Hopefulyl I can remember how to animate with it images/icons/smile.gif I'll find some tutorials on this board about adding materials, then i should be set once everything is converted over and then begin working on these dreaded animations..
LJHalfbreed
03-16-2003, 12:08 AM
Heh.. the animations aren't that bad. I'm just wondering if I'm not allowed to rotate things on that specific axis. THe trigger itself rotates during the shoot animation, so.... images/icons/confused.gif
-LJ
berzerker8x
03-16-2003, 12:27 AM
Hi,
Thanks for the info man, it's making my understanding a lot better.
I imported some of the default game models from the data.ras and they have joints and I dunno what else... I'm so newbie I don't know whaty they are images/icons/frown.gif And I'm not sure if they have animations or not, but when i scroll through the playback bar in Milkshape nothing is moving.
Since your knowledge is far grater than mine, is it possible to make animations in milkshape and export the gun like that, or would i have to use 3dsmax? 3dmax is a lot harder I think.0_o I'm still confused as to how joints work too... I can udnerstand how they are used in a human model, but how do i put them into a weapon?...
oh when you said the lod0, lod1 and levelitem needs animations, what do you mean? I'm slow...I would have to make an animaton of the gun shooting?.. Wut if say I have a weapon that doesn't need to move while shooting, could I just export the model as it is without animations or joints? I don't have joints yet, I have no clue how they work images/icons/frown.gif
I installed 3dsmax, and the MAx payne 3dsmax plugins as well, but there doens't seem to be options for me to import a KF2 file, only export right?
As for the reload animations.. I was thinking... would i have to make say a chamber that max drops when he reloads... I made a revolver as well, and when he reloads I want him to drop a chamber and stick in a new one. I duno if that is what you're thinking of too, how would we go about making that animation?...
Thanks again for the help,
sorry I'm so new images/icons/smile.gif hopefully we can figure everything out. I wish there were more tutorials scattered all around.
berzerker8x
03-16-2003, 12:33 AM
hmm that's weird then. Itm ust be the frame amount, if there's too many than it won't work perhaps.
Akari
03-16-2003, 01:59 AM
LJ you said 31 frames right? Try 30. Sometimes the MAX-FX engine does that with frames.
berzerker8x
03-16-2003, 11:10 AM
hey guys, you know the clip you drop when you reload. how many frames is that supposed to be? or can I just model the thing and export it?
thanks
ie: cilp_ingram
berzerker8x
03-16-2003, 07:26 PM
hi,
I took my model from MS3d and exported into 3dsmax, I checked it and it was lready skinned, whcih i had done earlier in MS3d. When i went to export it said that my skin was not a KF material so I couldn't export. what should I do? skin in 3dsmax instead of ms3d?
thanks
berzerker8x
03-16-2003, 07:36 PM
Hi,
I loaded the jpeg my skin, in the material editor in 3DsMAx and it automatically skinned the tmp and stuff, so then i exported and the same thing occured, this time it said my default - 1 material (the 3dsmax material) is not kf format. and own't export. what should i do so it exports with the textures?
or perhaps i don't even need to export the materials?
thanks
Akari
03-16-2003, 08:26 PM
Well this is hard. Hm... It will take a long time to do this. Ok.
Start Max4
Now make sure you put the plug-ins that you got when you installed Max-FX Tools (You did do a full install right?)
There are three different versions of max plugins available:
- KF2 Exporter (Generic geometry) for 3ds max 3
- KF2 Exporter (Generic geometry) for 3ds max 4
- KFS Exporter (Skins only) for 3ds max 3
The KF2 file format is used widely in the game database. All geometry that is "not levels and not skins"
is exported to the KF2 format. This means weapons, projectiles, skyboxes, character animations etc. The KFS file format is used for player models like Max Payne ect. Ufortunately, you're not able to have both KFS and KF2 plugins installed at the same time (don't ask me why) and the KFS plugins were never updated to support 3ds max 4. To install the plugins for any of the 3ds max versions
you will need to do this (Dear God) :
copy "kfexport.cfg" to 3ds max's "plugcfg" folder
copy "kfExport.dle" to 3ds max's "plugins" folder
copy "kfMaterial.dlt" to 3ds max's "plugins" folder
copy "rlmfc.dll" to somewhere which is in your PATH environment variable.The KFS/KF2 exporter has a "rescale" checkbox, which
should always be left at 0.01 though if you plan to model everything in centimeter scale.
Ok Now open your model. Then you need to open the material thingie (M) and then the browers that lets you add new images (thats at the right side. Asset Browers or something like that). Now of course put them in the boxes in your material box. Now click on the texture and assign it to the mesh. Then open the Library and choose "KF Material". It will now like very bright so lower the Difuss then make the other tabs beneath Difuss to like gray cause this is a gun. You should look at the rendered shot of the model to find the right setting (That's near the top right hand coner aka the tea pot). Then ....ummm....sh*T I don't know cause I don't have it opened right now! Ok maybe that will work. Try exporting it again to kf2. If that doesn't work then make another image and click on the children tab. This will take you to a diffrent menu. Now goto the Lib and choose this time "KF Texture" Now do the same Difuss trick here. Now apply it to the model. Check the renderd shot one last time before you export to make sure it isn't damn bright.
Now export to kf2. Make sure you do Geomertry and Materials and if you have an animation, Animations. I think that should work. Sorry if it's a weird tort but like I said I don't have Max open.
Anymore questions bug Maddieman. He has nothing to do images/icons/tongue.gif
Hope this helps.
berzerker8x
03-16-2003, 09:01 PM
Hey thanks a lot akari,
you've been a big help, I will test hts out right away. you wouldn't happen to know how many frames are in a clip do? anyways, if I anymore questions from here on i'll post it in them and bug others images/icons/smile.gif
thanks
berzerker8x
03-16-2003, 09:43 PM
ah man it didn't work. I'll make a post. thanks man
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.