Model Textures

So I thought I’d try animating a model for the first time. I used a copy of the lawn gnome from EP2. I rigged it, animated it, then exported it as a ‘.smd’. When I was compiling it I had the materials set to go to the right folder though they do not show up in Hammer or in-game. The animations and model are fine, just no textures. When I was compiling I had put the .vtf and .vmt files in the materials folder that I put in the .qc file. Is this the right way of doing it or am I missing a step. Do I need to somehow assign the texture to the model within the editor before I export or is it a different file type like a .tga or .bmp?

.qc file:



$modelname "gnomedance\gnomedance"
$cdmaterials "models\gnomedance/"

$scale 1.0
$surfaceprop "Flesh"

$body "Body" "gnome_reference.smd"

$sequence "dance" "gnome_sequence.smd" fps 30

$collisionmodel "gnome_reference.smd"
{
$mass 5
}


Could you post the QC?

Done ^^

The materials should be in /materials/models/gnomedance. If you need to know what files it’s looking for, open the .smd up in Notepad (or something). You’ll see a few hundred lines like this a few dozen lines down:



Materialname
15165 1515484 8498746 4867641 484654 987461
564565631 65456413 564151 4156465 64645646 654646
564 87 97 9987 9879846 84666
Materialname
15165 1515484 8498746 4867641 484654 987461
564565631 65456413 564151 4156465 64645646 654646
564 87 97 9987 9879846 84666


The numbers are defining the vertex/face data, and can be ignored. The readable text is defining the texture name. If ^ was in your SMD, you would need /materials/models/gnomedance/materialname.vmt.

All I get is default.bmp repeated for each face. Is that normal?

Yeah, that just means the texture it’s trying to load is “/materials/models/gnomedance/default.vmt”. Try putting the .vmt there.

Alright, thanks.

No problem.

Unless your material was called default it means you’ve not applied a texture to it, as that is what the SMD exporters set as the texture if none has been assigned (usually used for physmodels only).

Yea, that was the issue. I just swapped the default.bmp to the EP2 gnomes texture .vmt and it worked like a charm. I’m surprised it was not shifted or turned around.