HCE tutorial: Ripping models and textures from Source games

Tools: GCFScape (To open and extract from the gcf game files. A gcf is an all in one storage file) VPKTool (Originally a tool for Vampire: Bloodlines, but works for decompiling any Source game's VTF/VMT texture files to TGA format) MDLDecompiler (Converts Source .mdl format animation/model files into separate .smd files) SMDImporter (Script for importing aforementioned .smd files into 3DSMax) A source game. Photoshop (To convert the TGA files to TIFF files so tool can compile them) HEK SourceSDK (You may or may not need this. Pretty sure you do though.) A Hex editor (To edit the MDL file)

A few quick facts: You will probably want to make shortcuts to your Steam folder and Halo folder. Your steam folder should be located at "C:\Program Files\Steam". Your Halo CE folder is at "C:\Program Files\Microsoft Games\Halo Custom Edition". BSPs can not be ripped in the same method, so this only applies to weapons and pretty much anything else.

Step one: Getting the model and material files out of the gcf container

Firstly, open up GCFScape and hit File > Open, then browse to your Steam gcf directory. This is located here: "C:\Program Files\Steam\steamapps"

For this tutorial, you will be transferring the Huntsman from TF2, along with it's arrow (start with the arrow for simplicity's sake) so open "team fortress 2.gcf".

Hit the plus next to "tf" then hit the plus next to "models", then hit the plus next to "weapons", and finally, the plus next to "w_models". In the right window, go ahead and select everything that has "w_arrow" in it. http://content.scree...-07-25_0335.png

Then right click in the right window, and click "Extract" and choose a folder to store it in.

Now, go to file > open again, and this time select "team fortress 2 materials.gcf".

Press plus next to "tf" then the plus next to "materials" then the one next to "models" then the one next to "weapons" then in the right menu, find "w_arrow" and right click it. Finally, select both files in the folder, and right click and hit export. Export it to your "arrow" folder.

Step two: Converting the model container file to separate meshes and animation files

This part requires a bit of setup. Take the provided "MDLDecompiler.exe" file, and place it in your sourcesdk HL2: Ep1 bin folder. This is located at "C:\Program Files\Steam\steamapps\\sourcesdk\bin\ep1\bin".

Once you've done that, open the MDLDecompiler exe.

Now, before continuing, there is something you may have to do. If you are ripping a model from any Orange Box game, you will need to hex the main .mdl file because of version differences. Open up your favorite hex editor and open "w_arrow.mdl" in it.

Click on the 0 that is highlighted in the previous picture. From here, hit the comma on your keyboard, and you should see it replace the zero.

Save and exit, then switch back over to the mdl decompiler. From here, put in the location of your model in the top box. Then, put in where you want the output.

Now make sure all the boxes at the bottom are unchecked and hit "Extract" and hit okay when it says model loaded. Then just wait until it says "Completed dumping model".

Your model is now extracted as a .smd file, and can be loaded with the provided 3DSMax script. The main model is always the one with the file name and then "_reference" in front of it. Go ahead and load 3DS, and click the "Maxscript" dropdown and hit "Run script" and browse to your script and open it, then hit the little hammer tab.

Then click the maxscript button, and it should bring out a dropdown box under "Utilities". Change the dropdown to "Half-Life smd import" and it will open the importer below it. From here, click the "Import smd" button, and scroll to your arrow folder, then select "w_arrow_reference.smd".

Hit okay, and wait for it to import. You should then see your model imported into 3DSMax!

Keep in mind this is only the arrow as of right now.

Now, you just have to repeat the process above for the bow itself. The bow does not have a "W_Bow" model, which is called a world model, it only has a "C_Bow" model, but this will work fine. You will find the model and textures in the same place as the arrow's, except it will be in "c_models" instead.

Extract and convert everything exactly as you did before. All of it is the same.