Admin, if you think this is the wrong forum please move this thread to the appropriate place. I couldn't decide where to put this so I just put it here. Thanks in advance.
Over the past few days I was on a tangent. I wanted to make some models. These images are the result of my work. Let me start out by telling you in detail what I did. First you may want to download the files at the bottum of my post, these are my finished models.
- Description of models -
First model is a new m249 (previously para) model. I wanted to use the hero 'Pimp' only replace the dual m4 model with a new model, made by me. I ended up going with a free high detail railgun model I found with a simple websearch. For this project, I needed to create 2 things, a p_m249.mdl and a v_m249.mdl. For those who don't already know every weapon model has at least 2 models, p - one which is seen in 3rd person mode, and v - which you see yourself hold in first person mode. I had to create from scratch both of these models.
- I Used Milkshape, the trial version -
Well the model I got was in Cinema4d format, so I open C4d and converted the model to a lightwave object, to be imported into another program simply called '3d photo browser'. This was done for one reason, the model I got was extremely complex with more than 30,000 vertices and 20,000 faces. A typical half life gun is typically between 1,000 and 2,000 faces. 3d photo browser has an advanced polygon reducing tool, which has options for preserving textures and edges. I had to run it twice, with almost 90% compression (which is almost max) and with extra preservation on the barrels to get a model that still looked like what I started with. Okay now that was the easy part.
- The hard part -
The easiest thing to do now is to find default models for the gun you are skining, I didn't want to reskin a reskin. So I found the default m249/para files online and put them in a folder. Now you should do these next parts one at a time, one for the v_model and one for p_model. You want to decompile one of the original m249/para files, so you get the files that were used to compile the model. This is composed of a .qc script, several .smd's which are small detailed models (smaller parts of the larger .mdl), and last texture .bmp's. You are only concerned with editing m249_reference.smd - this file contains a wireframe of the old gun and the wireframe of the skeleton. That and you may want to rebuild textures, so your guns will show up the way you want them to.
- Combining your new model with the old reference model -
You need to save m249_reference into a milkshape file, so you can close it and use it to merge with the new model file. Import your new_model.lwo into a new window. Now choose 'File->Merge' and select the m249_reference.ms3d. This will bring your new model, and old model, into the same window. Now select your new model, and scale it down to approximately the same size as the old one (or larger if your want a larger gun...). Next, obviously you need to 'move' in all 3d directions your new model on top of the old one. You can delete the old model and old textures now, but keep the old skeleton. Now, this is slightly tricky this gave me a lot of trouble. Before you can compile this window into your new_m249_reference.smd you must assign the vertices of the model to the corresponding joints they need to touch in the skeleton. I did this easily by selecting the entire model, and going to 'Tools->Joint Tool'. This tool has one button which reads 'assign unassigned vertices to nearest join'. This should typically do what you want it to do, bind key vertices to key joints. This acts as reference points for things like where your skeletal model ingame grabs the gun, where your bullets originate from, and probably some more stuff. Be sure all your models have been assigned a texture, or they wont show up. Textures will only be read in 8bit bmp format or you'll get errors and crash.
- If that all went smooth... -
You may be ready to export your window into a usable .smd file. You wll want to replace the old_m249_reference.smd with this one by 'File->Export->Half-life smd. If that worked, you might be ready to compile your new model. Check your .qc script file you plan on using to compile, you may be able to reuse the one from the old model you decompiled. I was so fortunate. You only need to update the paths in the qc files, most of the definitions and hitbox info should still work. Click 'Tools->Half-life->Compile .qc' and if it worked, you will have your spanking new model in the destination folder you defined in your .qc script. You are halfway done, you should now have a new and viewable p_m249.mdl that you can check out using your favorite model previewer.
- Now rinse and repeat -
You must do a similar process for the v_model you want to create. Be careful not to delete the HAND and FINGER models and textures when you are merging your old skeleton with your new model. This v_model is the first personal model and is substantially larger in scale than the parallel p_model so you may have to resize to scale again. Again don't forget any textures or joint and you shouldn't have any problems compiling your .smd's and .mdl's.
That tutorial was based on my first model, the new m249. I'm using my new para to replace the models in the hero 'pimp'. The texture I used was just ripped from the gundam mech model, I wanted to create cohesion between the new 'railgun' and my gundam model on my server and I didn't feel like making a texture, so I just borrowed one...It ended up getting stretched, and gives a 'techy' feel that I'm happy with for now.
- The New Deagle -
The second model I made was easier, my v_deagle.mdl was already included I only had to create the p_deagle.mdl. Some complications arose while making this model cause I did not turn the model into a deagle, like it was desgined for. I'm using this pistol model as a replacement awp model for the hero 'mad assasin'. I ripped the new gun model onto the old awp skeleton and didn't have too much trouble. Some of the animation is stumbly cause I'm new at this and I don't completely know what I'm doing yet.
- Final notes -
Please feel free to use my railgun and deagle/awp models. Also feel free to fix the texture used for the railgun so it looks like something 'real'. I may in the future get to texturing the beast. I will post if I do.
I was prompted to make this tutorial because of the difficulty I found in getting this information in one nice spot. I hope someone uses this and learns something. If you have any questions post them up and I will respond.