Need help understanding how textures for custom models work

Let me start off by saying I’m new to modeling. I’m pretty sure the problem I’m having is due to some kind of basic modeling or importing knowledge that I don’t have. I’ve been (slowly) learning everything on my own using various guides and resources from the Internet, and a lot of it is either out of date, or presumes an existing knowledge of how everything works. After spending many frustrating hours researching and experimenting to no success, I finally broke down and decided to ask for help here.

I made a rocket in 3ds Max, exported it using wall worm, compiled it, and got it in-game. However, it’s pink and black. I made a uvw map, textured it, applied it to the model in 3ds Max, as well as converting the texture map to .vtf and .vmt (using VTFEdit) and tried compiling with them in the folder AND putting them in all kinds of different folders. I still can’t get the texture to be applied to the rocket in-game. Can anyone explain to me how to get the texture on it?

I’m not familiar with 3ds max but I know for a fact that you need to name the material in 3ds the same name as the .vmt is called.

Also make sure you specify the directory of the texture in the model’s .qc file:
Ex. If the texture is in materials\models\rocket
you would use the command: $cdmaterials models\rocket\

Also make sure that the vmt points to the correct vtf file by opening it with a text editor.

This was one of the problems I had when I started making models for Garry’s Mod as well. With some help I eventually figured it all out.

First of all you don’t have to apply the textured uvw map in 3ds max. I usually just open the material tool and click on the first “material globe” and select a colour like light gray or something, then I name it what I would call my texture file eg. rockettexture. And when it’s done I export it. Then I set up the QC file so it fits the folders I’ve made for the model.

For example:
Folder 1: Material/models/rocket <- There you have the vmt and vtf files you’ve created from the UV unwrap
Folder 2: Models/rocket <- There you have your compiled model file

This means that the QC path to the materials should be “models/rocket”. I used $basetexture but you might be able to use $cdmaterials as well, I don’t know the difference.

And also make sure your vmt file is “VertexLitGeneric”. Below is an example of one of my models vmt file.
“$basetexture” “models/speedradar/radar”


Thanks guys. Hulapyk helped me on steam. Finally got it all working.