Editing .mdl Skins

Download it: Otis' Model Viewer 64 K

This tutorial covers how to use the Model Viewer from the Half-Life Workshop to edit skins for .mdl files using the Recon Grunt as an example. This is a supplement to my Skin Tutorial, so check that if you need information about editing skins. The recon.mdl and the skins files are included in the skins.zip, but if you just want to edit it and don't want to download the skins.zip, download the recon model from a model or skins website.

The model viewer is an OpenGL application and needs the proper .dll files and may need a C++ .dll as well, which is all listed in the readme. If the viewer won't open, check for the internet addresses in the readme to find out where to get these drivers. If you have problems while using the model viewer, email Otis with a detailed problem report.

Although this will show how to edit a multiplayer model, all the models in Half-Life can be edited also. This is beneficial to mod groups who would like to use variations of Half-Life's existing monsters. I'll cover this topic at the end.

Basic Tutorial
1 > After you download the model viewer and the recon model, run mdlv21.exe and open up the recon.mdl. The model will open up in the main window and a popup window will appear. This is the Model Control Center and will be where you export / import the skins from. I've highlighted the buttons we'll be using in the picture below.

Model Control Center



2 >
In the "Textures and skins" section there are plus and minus buttons, that cycle through the model's skins. Use these to select the skin you want to edit. The skin area that's selected on the model will flash, so click the "Export texture" button and save it. The Recon Grunt has a skin for his body and his face. You can name them whatever you'd like, but I've called them DM_Bace.bmp for the body and DM_Face.bmp for the face.

3 > Now you're ready to paint on them. Open them up in a paint program such as Photoshop or Paint Shop Pro. It's important that you don't change the size of the file. Use the areas that are already painted as a template to paint your own, but don't change the file size.

In the DM_Face.bmp is the face and head, arms and a beret that's not used. In the DM_Base.bmp is the beret that's used, and in the middle left is the shoulders, and the middle right has the sides of the boots and the hand. In the DM_Base.bmp palette are reserved areas for team colors, which I've highlighted in the picture below. Don't use these colors in the rest of the skin or else they'll change too. The rest of the palette can be changed, as well as all of the DM_Face.bmp palette. See the Skin Tutorial for more information about changing the palette.

Recon Grunt Multiplayer Model

DM_Face.bmp DM_Face Palette
DM_Face
DM_Face_Palette

DM_Base.bmp

DM_Base Palette
DM_Base
DM_Base_Palette



4 > After editing the skins, you're ready to put them back in the .mdl. Open the recon.mdl up in the model viewer if it already isn't, and click the plus button to get to the face skin. It will flash when it's highlighted. Click the "Import texture" button and open up the DM_Face.bmp. Then click the plus or minus button to get to the body's skin and import the DM_Base.bmp. Click the "None" button and the highlight will go away so you can see your new edited model. Save the file. You can overwrite the recon.mdl you have, and it will bring up a confirmation if you want to do this. Note when you're saving a model that has some extra files, such as the ones from Half-Life's pak file, the model viewer will take a little time to save these. It's just a pause, it's not crashing, and this is mainly on larger model files anyway.

5 > Now you're ready to make a Multipayer Bitmap for it, so check the Skin Tutorial for that information, then you'll be ready to release your new edited Recon Grunt. As a reminder, I'd like to add that whenever you edit a model to play on the internet, everyone on the server needs to have your model to be able to see your changes to it. If you put your face on the recon grunt and other people have your model and are using it, then you will see your face on them. Even if they don't have your new model, but they do have a recon.mdl in the same recon folder that you do, then you will still see your face on them. This might make for interesting gameplay, to be trying to kill yourself!



Editing models from Half-Life
You can edit any skin from models that are in the .pak file. You'll need a pak utility such as QPed. Open the \Half-Life\valve\pak0.pak file and look in the models folder. Extract one that you'd like to edit, along with it's extra model and textures files. For example, Barney has not only barney.mdl, but also barney01.mdl barney02.mdl barney03.mdl and barneyt.mdl. Extract all of these or it won't correctly. Run the model viewer and just open barney.mdl. Use the plus and minus keys to highlight the skins that you want to edit. Export them, paint over them, and import them back in again. Only change the colors for the skin, don't change the size of the file. Then save the model as barney.mdl. Now put all of the model's files in the \Half-Life\valve\models folder. Create the folder if it's not there yet. You don't need to put them back in the .pak file. When Half-Life runs, it will use your edited models in place of the ones in the pak file.

If you're working on a mod and want to include these new files, it's recommended to create your own pak file to release. Set up the same folders that are in Half-Life's pak file and put these new files in the models folder. When anyone runs your mod, Half-Life will load in your models instead of the ones in it's own pak file. This is the simplest way to replace models from the game.


If there are any questions or comments, feel free to email me.

Spider
Wavelength - Half-Life Editing
http://www.planethalflife.com/wavelength/