Download (direct link):
To load the player model that is going to be modified, select Player from the Groups drop-down list, then select player_marine_mp. The model will be visible in the preview window, as in Figure 18-1.
Resizing and moving windows around make viewing your model much easier.
On the Surfaces tab of the preview window, you find the different materials that are used by this model. You constructed a material file in Chapter 15 when you created your custom texture. Well, this happens to be the same thing, except in this case, it’s being used by the model instead of by a map.
The materials listed on this tab should also be noted. You will be searching the game files for these material files, and knowing their paths is a great help. The list of material files is as follows:
Ii^ models/characters/marine/body: This material defines the torso of the model.
Chapter 18: Re-Skinning the Models 321
models/characters/marine/body_collision: This defines the torso after it has received damage such as being shot in the game.
models/characters/marine/eye: Even the model’s eyes are separately defined.
models/characters/marine/hair: This file defines the model’s hair, which allows the developers to reuse materials when making different characters in the game.
models/characters/marine/teeth: The teeth are separated from other files to assist in lip syncing.
models/characters/marine_heads/kane6: Within the game, you play as Kane, and this file defines the face and head.
models/characters/marine_heads/head_collision: Here are the face and head after they have received damage.
Hunting Down Your Mod Files
You now know what materials were used in texturing this model. You next have to locate these defined materials within the installed game files. From within them, you can find the editable images.
Searching in materials
In Chapter 15, you created your own textures and a material file with the .mtr file extension. From this, you know that you need to locate the material file that is associated with the materials noted earlier for the player that you’re mod-ding. You also know that material files are saved in a folder that starts with C:\Program Files\id Software\Quake 4\q4base\materials. This information is going to come in handy. Here’s how you locate the materials associated with the model so that you can add your custom skin to the model:
Open Windows File Explorer and navigate to the Quake 4 base directory. This would be C:\Program Files\id Software\Quake 4\q4base, where all the pak files are located.
As you discovered in Chapter 14, the game file you’re looking for is somewhere within these pak files, and you have to locate it.
There is actually logic to the way that the pak files are put together. If you open the pak file with WinZip and sort its contents by the Path column, you can see that they are all alphabetically listed. Each pak file is about 215M, and what doesn’t fit into the first pak file is located into the next pak file. Therefore you can follow the paths alphabetically as you open the pak files numerically.
322 Part IV: Going Beyond the Basics
2. Find the right material file.
I opened each of the pak files looking for a material file that contains the materials noted earlier (models/characters/marine/body, models/ characters/marine/body collision, and so on) when the player model was open in ModView. After a little guessing and some trial and error, I found that the file that was needed was characters.mtr located right in the path materials. This file is located in pak002.pk4.
Open pak0 02.pk4 with WinZip. Sort the contents of this pak file by the Path column by clicking the column name. Scroll down until you reach the path materials. Then locate the characters.mtr filename.
3. Right-click the file characters.mtr from within WinZip. From the menu, choose View with NOTEPAD.EXE.
This causes the selected file to open in Notepad.
4. Search this material file for the materials that were listed in ModView. Press Ctrl+F to open the Find dialog box. Type the first material on the list, models/characters/marine/body, next to Find What and click Find Next.
When Find has found the line exactly as entered, you have found the texture definition for this file. The result should read as follows:
noSelfShadow unSmoothedTangents // materialType flesh
renderbump -size 1024 1024 -trace 0.07 -aa 2 models/characters/marine/body_local.tga work/models/characters/marine/newbody_hi.lwo
diffusemap models/characters/marine/body_d.tga bumpmap addnormals (
models/characters/marine/body_local.tga, heightmap (
models/characters/marine/body_h.tga, 2 )) specularmap
map models/characters/marine/body_g.tga }
This code segment should look very familiar. It looks a lot like the texture definition that you made in Chapter 15. From the steps in that chapter, you might have figured out that the images listed here are those that you want to modify in order to modify the player’s skin. Those images are