[Tutorial] Give Models more textures for use

Tyron

Newbie
Joined
Apr 27, 2008
Messages
108
Reaction score
0
On a request for how to get more skins on a model I made this tutorial.

Okey well first of all lets start with what we need:

  1. Source SDK
  2. GCFScape - (Official site)
  3. Cannonfodder's StudioCompiler - (Official site)
  4. Notepad (or another textfile editor)
  5. Some new textures (for the door)

Okey if we got all of the list we can continue..
Make sure you've installed the programs (StudioCompiler might be a bit dificult i'll give a lil walktrough for this)

Step 1
For this example I use the default door that already got multiple skins (Skin Families)
Just skip these steps when you got your own custom model.

Okey first we gotta get the door model out of the GCF well locate this GCF package and open it: (I'm on drive "D://" you might just got it on "C://")
80179861np5.jpg

Next browse to the same directory as I am (hl2/models/props_c17/) and look for the "door01_left" files and select them all,
then you drag them into an empty folder (for my example i chose Desktop/Trunk)
23539716re0.jpg

Step 2
Okey well here we need the cannon's fodder program. the installation is a bit weird but you have to install the stuff into: "%your path%\Steam\steamapps\%username%\sourcesdk\bin\ep1\bin\"
make and shortcut of it.
Try to start it up if you get an error about some ToolsAppId 211 then do this: go to the directory of the game your busy with in your SDK,
as an example we got Half Life 2 Deathmatch; the directory should be "%your path%\Steam\steamapps\%username%\half-life 2 deathmatch\hl2mp\".
Look up the file named "GameInfo" open it and remove the line "ToolsAppId 211" (Warning! when you want to startup SDK this line has to be back in again so remind this!)

Okey one's you've done this you must know when cannonsfodder is started up you cant startup SDK. I'll just simply first startup SDK and then the cannonsfodder ^^.


Ok back to business..
Startup cannonsfodder and got to the tab "Model Decompile" next fill in all the paths to the models and extraction folder. (Notice the button behind the first box isn't working so just copy and paste the directory's path into it and then write down the models name)
(another Notice make sure the extraction folder is already there)
78301985ib0.jpg

Extract everything and when you did all fine you will have an QC file with your extrated files (Probably named "mdldecompiler"). open it and look up the lines:
$texturegroup skinfamilies
Code:
$texturegroup skinfamilies
{
	{ "door01a.vmt" }
	{ "door01a_skin2.vmt" }
	{ "door01a_skin3.vmt" }
	{ "door01a_skin4.vmt" }
	{ "door01a_skin5.vmt" }
	{ "door01a_skin6.vmt" }
	{ "door01a_skin7.vmt" }
	{ "door01a_skin8.vmt" }
	{ "door01a_skin9.vmt" }
	{ "door01a_skin10.vmt" }
	{ "door01a_skin11.vmt" }
	{ "door01a_skin12.vmt" }
	{ "door01a_skin13.vmt" }
	{ "door01a_skin14.vmt" }
}
these are our skins!! we found uhm ^^
(for those who use custom models you can add these lines into your model but be aware;
that they must be placed behind the "$model" handlers so if you place them before the "$cdmaterials" its all fine)

k well just add another skin file, and save it.
Code:
	{ "door01a_skin13.vmt" }
	{ "door01a_skin14.vmt" }
	{ "door01a_newskin.vmt" }
}

Step 3
Well now we gotta set eveything back into the mdl files.
Go to the tab "Model Compile" then choose "Compile w/Existing QC" look up your QC file, make sure the folders are there, not in the GCF file but in "%your path%\Steam\steamapps\%username%\half-life 2 deathmatch\hl2mp\" for this example we gotta heve "%your path%\Steam\steamapps\%username%\half-life 2 deathmatch\hl2mp\models\props_c17\".
when all is ok Compile everything
34166970rn1.jpg

Okey well now everything is done for the model..

Last step is to place the textures into the correct folder for this example its: "D:\Program Files\Steam\steamapps\krosn\half-life 2 deathmatch\hl2mp\materials\models\props_c17\"
and make sure that our texture has the correct name: "door01a_newskin.vmt".

Last words
Well this was it hope it was informative and usefull.
I didnt included the things about the textures cause this tutorial wasn't ment to teach you that. you can easilly figure it out with the cannonsfodder

So good luck! :)
 
this will help alot of people!
thank you : )

-dodo
 
You don't really need to decompile and recompile your model to give it a new skin. There is a program to add skins, change propertiers and so on (you can do it manually with Notepad).
 
Thanks again for posting this. Test, if one can do this with notepad, can you give a quick example, which file to load in notepad, what to look for etc?

thanks

O also, can this method be used to decompile the models from counterstike:source and import them into halflife 2:episode 2? or is there an easier way to do that too?
 
Back
Top