Post by thechosen1 on Sept 19, 2008 10:14:18 GMT -5
First off, I would like to thank magnum29, SpiderVenom, LeonPlisken, Satyr, james, St. Vampyre, and Parser for their aid in helping me to understand this (sometimes) difficult concept. It was a lot of trial and error on my part, but I think I've finally gotten the hang of this.
I'm writing this guide to help all of the fresh new guys out there, because I remember what it was like being in that position. It sucked. I spammed Spider Venom, magnum and james' inboxes (sorry guys. XD) about how to do certain things, and for putting up with my infinite noobitude, they have my thanks.
This tutorial will teach you how to import CS, CS:S, and CSCZ models into RE4. It's simple, and only requires Milkshape (or whatever modeling program you like), a MDL decomplier (one comes with Milkshape), St. Vampyre's PMD viewer (I would reccomend Magnum's tool, but St's tool is relatively idiot-proof, once you know what you're doing), and a copy of RE4.
First, we need several things to import a weapon into RE4, besides the programs listed above. You need:
1). Your CS model (be it a view, world, or player model)
2). An ORIGINAL RE4 weapon PMD file (when importing handguns, I like to use the standard Handgun as a scale reference, and when importing anything bigger, I use either the TMP, Shotgun, or Semi Auto rifle, depending).
3). About fifteen minutes
4). A photo editing program (I prefer GIMP, but Photoshop works just as well)
Part 1: Scaling
1). Unpack your CS model (should be a .mdl file) and put it somewhere isolated (I have my own folder for this. Try putting it in your Documents or something. I'll refer to my folder as "RE4 mods").
2). Copy and paste St Vampyre's PMD viewer and the original PMD file into the same folder.
3). Open the PMD viewer. Open your PMD (the one in the folder)
4). EXPORT the pmd into an OBJ file. I usually name mine "Scale" or something like that.
5). Open Milkshape.
6). Go to Tools/Half Life/Decomplie Normal MDL file. If you're not using Milkshape, follow your decompiler's instructions and decomplie your .mdl file into a SMD file.
IMPORTANT: The above only works for CS/HL models. If you want a HL2/CSS/CZ model, then download Cannonfodder's MDL Decompiler and a VTF converter. You need HL2/CSS dll files for this to work (in other words, your own copy of those games).
7). Import the SMD. If you imported a Player or View model, export the model as a .obj file and re-import it, in order to remove the animation weights and bones.
8). Import the RE4 OBJ file.
9). Scale the CS model so that it is in scale with the RE4 model.
Part II: Skinning
10). Next, take the bmps that came with the SMD file and open them in your photo editor (in my case, GIMP)
11). Convert the bmp files into RGB mode, and flip them vertically.
12). Re-save the files as .tga files.
13). Go back to the model in Milkshape. Delete the RE4 model.
14). Next, create one group per model part (for example, if a handgun comes in 2 parts, the gun and the mag, create two texture groups, under "Materials")
15). Assign each one of these groups in the Materials tab a .tga file.
16). Then, assign each one of the Materials to a part of the model.
Part III: Importing the model
17). Export the model as a .obj file
18). IMPORTANT!!!! Open the .mtl file that corresponds with the .obj you just made.
19). When Milkshape exports the .obj file it uses absolute directory paths for the materials in the .mtl file.. All you have to do is open up the corresponding .mtl file and fix the path so it references the tga files directly. For example, instead of
map_Kd .\Games\RE4\xfile\em\wep\MP51.tga
it should just read
map_Kd MP51.tga
20). After saving the Notepad file, NOW go to St. Vampyre's PMD viewer.
21). Make sure you know what parts of the RE4 PMD you want to overwrite. If we're importing a handgun, I'd replace the original PMD's handle with the CS model's handle, the PMD's magazine with the CS model's magazine, etc. This prevents funky reload anims in game.
22). Copy and paste the new PMD file and it's corresponding textures into your RE4/xfile/em/wep folder.
23). Fire up RE4. Enjoy your new mod!
I'm writing this guide to help all of the fresh new guys out there, because I remember what it was like being in that position. It sucked. I spammed Spider Venom, magnum and james' inboxes (sorry guys. XD) about how to do certain things, and for putting up with my infinite noobitude, they have my thanks.
This tutorial will teach you how to import CS, CS:S, and CSCZ models into RE4. It's simple, and only requires Milkshape (or whatever modeling program you like), a MDL decomplier (one comes with Milkshape), St. Vampyre's PMD viewer (I would reccomend Magnum's tool, but St's tool is relatively idiot-proof, once you know what you're doing), and a copy of RE4.
First, we need several things to import a weapon into RE4, besides the programs listed above. You need:
1). Your CS model (be it a view, world, or player model)
2). An ORIGINAL RE4 weapon PMD file (when importing handguns, I like to use the standard Handgun as a scale reference, and when importing anything bigger, I use either the TMP, Shotgun, or Semi Auto rifle, depending).
3). About fifteen minutes
4). A photo editing program (I prefer GIMP, but Photoshop works just as well)
Part 1: Scaling
1). Unpack your CS model (should be a .mdl file) and put it somewhere isolated (I have my own folder for this. Try putting it in your Documents or something. I'll refer to my folder as "RE4 mods").
2). Copy and paste St Vampyre's PMD viewer and the original PMD file into the same folder.
3). Open the PMD viewer. Open your PMD (the one in the folder)
4). EXPORT the pmd into an OBJ file. I usually name mine "Scale" or something like that.
5). Open Milkshape.
6). Go to Tools/Half Life/Decomplie Normal MDL file. If you're not using Milkshape, follow your decompiler's instructions and decomplie your .mdl file into a SMD file.
IMPORTANT: The above only works for CS/HL models. If you want a HL2/CSS/CZ model, then download Cannonfodder's MDL Decompiler and a VTF converter. You need HL2/CSS dll files for this to work (in other words, your own copy of those games).
7). Import the SMD. If you imported a Player or View model, export the model as a .obj file and re-import it, in order to remove the animation weights and bones.
8). Import the RE4 OBJ file.
9). Scale the CS model so that it is in scale with the RE4 model.
Part II: Skinning
10). Next, take the bmps that came with the SMD file and open them in your photo editor (in my case, GIMP)
11). Convert the bmp files into RGB mode, and flip them vertically.
12). Re-save the files as .tga files.
13). Go back to the model in Milkshape. Delete the RE4 model.
14). Next, create one group per model part (for example, if a handgun comes in 2 parts, the gun and the mag, create two texture groups, under "Materials")
15). Assign each one of these groups in the Materials tab a .tga file.
16). Then, assign each one of the Materials to a part of the model.
Part III: Importing the model
17). Export the model as a .obj file
18). IMPORTANT!!!! Open the .mtl file that corresponds with the .obj you just made.
19). When Milkshape exports the .obj file it uses absolute directory paths for the materials in the .mtl file.. All you have to do is open up the corresponding .mtl file and fix the path so it references the tga files directly. For example, instead of
map_Kd .\Games\RE4\xfile\em\wep\MP51.tga
it should just read
map_Kd MP51.tga
20). After saving the Notepad file, NOW go to St. Vampyre's PMD viewer.
21). Make sure you know what parts of the RE4 PMD you want to overwrite. If we're importing a handgun, I'd replace the original PMD's handle with the CS model's handle, the PMD's magazine with the CS model's magazine, etc. This prevents funky reload anims in game.
22). Copy and paste the new PMD file and it's corresponding textures into your RE4/xfile/em/wep folder.
23). Fire up RE4. Enjoy your new mod!