Converting Source models to Goldsource
by Le Chief (view all articles)

1 rating / 4 stars
The easy Way
by Le Chief (view all articles)

1 rating / 4 stars

Here is my second tutorial I have written for the goldsource engine. In this tutorial, we will learn how to convert models from the source engine (Half-life 2) to the goldsource engine with minimal quality loss.
In this tutorial, we will organize the whole process into some simple, easy to read steps. So lets start.
This step is about downloading the right tools.
You need to download...
Half-Life 1 tool set: http://anders.jenbo.dk/cubed.dk/nobody/ (thanks to wolf from verc)
Half-life 2 model decompiler: http://chaosincarnate.net/cannonfodder/cftools.htm
GCFScape: http://nemesis.thewavelength.net/index.php?c=76
VTF Edit: http://nemesis.thewavelength.net/index.php?c=178
These contain all the programs we need to convert our model. Specifically we need the following:
Wally
Wiesel which uses studiomdl.exe
VTF edit
GCFScape
HL2 model decompiler
Also, once you install the half-life tool pack, don't mess around with it, because some programs are linked to other programs, and they are all already preset and linked together.
Get the model you want to convert onto your desktop, there should be about 5 files to make up the one model. Don't pick something complicated like a person or something. Look in the props_junk directory and pick a nice piece of rubbish or junk to start out with.
You also need the model's texture, go into the corresponding directory and get the texture eg: materials/models/props_junk. Usually the textures will have the same name as the model, but sometimes not. If you're unsure which texture it is, don't worry, we can get the texture later, if you're sure, than put the vtf file onto your desktop.
Assuming that the half-life 2 model decompiler is set up correctly (read the instructions), open it up and decompile your selected hl2 model to "c:/models". You're obviously going to have to create that folder.
This step is all about getting the texture converted properly, if you where able to find the right texture in step 2, if you didn't please skip this step.
Half-life 1 models require that the texture be in 8 bit (256 colors) bmp format. The easiest way to do this (assuming your texture does not need to be masked (255 blue)). Is to open the texture in vtf edit, export it as a jpeg, than open wally, create a new, temporary half-life wad, drag the jpeg image into wally, wait for the image to convert than export the image to c:/models as a bmp. Because half-life textures have a limit to the length of their name, if the texture you imported has a long name, make sure that after you export it as a bmp from wally, you rename it back the way it was.
Place the finished bmp file into c:models.
We now should have all the source files required to compile your model. Open up weasel. Select our bmp texture that we converted earlier and placed in our c:/models directory. Also, we select our appropriate smd file. We don't want to select any animations or any of the lod models, we want the reference one. Select the right smd. Next, we should have a list of smd's in the box below it, we want to select in this box the same thing we selected in ".smd folder". Then hit compile model. We should now have a fully compiled model in our c:/models directory.
If you where unable to find the right texture earlier in step 2, than your texture field in weasel will be empty. This is fine, compile the model anyway. You will get an error message "unable to find texture:______". It will tell you exactly where the texture is, so go find it, go back to step 4, than recompile the model.
Texture too large
This issue can sometimes happen. The best way to correct it is to go back to the original jpeg, open it up in paint and shrink it by 50%, than convert it back to the bmp we want though the whole process. We could just scale down our bmp, but more quality is lost like this.
Too many vertex/planes...
Sometimes you can get this. The half-life 2 models are very detailed, sometimes too detailed for goldsource. If this occurs, try using the first lod model, than the second lod model until you find one. This is pretty rare though, so you should be ok. It mainly happens with character models.
Bmp not right format/version 4 not supported
This means that the bmp is not an 8 bit image, probably because you didn't go through the process of converting it though wally. This is an essential process.
In this tutorial, we will organize the whole process into some simple, easy to read steps. So lets start.
Step 1
This step is about downloading the right tools.
You need to download...
These contain all the programs we need to convert our model. Specifically we need the following:
Also, once you install the half-life tool pack, don't mess around with it, because some programs are linked to other programs, and they are all already preset and linked together.
Step 2
Get the model you want to convert onto your desktop, there should be about 5 files to make up the one model. Don't pick something complicated like a person or something. Look in the props_junk directory and pick a nice piece of rubbish or junk to start out with.
You also need the model's texture, go into the corresponding directory and get the texture eg: materials/models/props_junk. Usually the textures will have the same name as the model, but sometimes not. If you're unsure which texture it is, don't worry, we can get the texture later, if you're sure, than put the vtf file onto your desktop.
Step 3
Assuming that the half-life 2 model decompiler is set up correctly (read the instructions), open it up and decompile your selected hl2 model to "c:/models". You're obviously going to have to create that folder.
Step 4
This step is all about getting the texture converted properly, if you where able to find the right texture in step 2, if you didn't please skip this step.
Half-life 1 models require that the texture be in 8 bit (256 colors) bmp format. The easiest way to do this (assuming your texture does not need to be masked (255 blue)). Is to open the texture in vtf edit, export it as a jpeg, than open wally, create a new, temporary half-life wad, drag the jpeg image into wally, wait for the image to convert than export the image to c:/models as a bmp. Because half-life textures have a limit to the length of their name, if the texture you imported has a long name, make sure that after you export it as a bmp from wally, you rename it back the way it was.
Place the finished bmp file into c:models.
Step 5
We now should have all the source files required to compile your model. Open up weasel. Select our bmp texture that we converted earlier and placed in our c:/models directory. Also, we select our appropriate smd file. We don't want to select any animations or any of the lod models, we want the reference one. Select the right smd. Next, we should have a list of smd's in the box below it, we want to select in this box the same thing we selected in ".smd folder". Then hit compile model. We should now have a fully compiled model in our c:/models directory.
If you where unable to find the right texture earlier in step 2, than your texture field in weasel will be empty. This is fine, compile the model anyway. You will get an error message "unable to find texture:______". It will tell you exactly where the texture is, so go find it, go back to step 4, than recompile the model.
Compiling Issues
This issue can sometimes happen. The best way to correct it is to go back to the original jpeg, open it up in paint and shrink it by 50%, than convert it back to the bmp we want though the whole process. We could just scale down our bmp, but more quality is lost like this.
Sometimes you can get this. The half-life 2 models are very detailed, sometimes too detailed for goldsource. If this occurs, try using the first lod model, than the second lod model until you find one. This is pretty rare though, so you should be ok. It mainly happens with character models.
This means that the bmp is not an 8 bit image, probably because you didn't go through the process of converting it though wally. This is an essential process.