Checkerboard Texture Issue

So, I’m porting my first model to SFM (it’s my own original model, so it’s very exciting and all), and surprisingly I was able to get the actual mesh to work, and that shows up fine in the model viewer.

But the texture (there’s only one for the whole model) is not showing up.

My QC states:


$cdmaterials "models/username/modelname

And my VTF and VMT are in “materials/models/username/modelname” (because I was told the “materials” part isn’t necessary to put in).

My VMT is:


"VertexLitGeneric"
{
	"$basetexture" "models/username/modelname"
}


So, what is my problem? I hope it’s just something dumb I’m not realising yet.

[editline]23rd August 2017[/editline]

Update: This model has decided to be a really good person to me and become completely invisible for some reason. I have no idea how to fix it.

$basetexture has to point to a vtf file,


"$basetexture" "models/username/modelname/vtfname"

for example. Not sure if the “.vtf” part had to be in the path as well though.

Make sure the models has the correct material name as well.
When you assign a texture to the model in a 3D editor and export it as .smd, only the texture name will be saved, not the path.
Say you apply the texture


C:\some\path\coolTexture.png

to the mesh.
When you export the model to .smd, only


coolTexture

will be left in the model file.

When you compile the model and specify


$cdmaterials models/username/modelname

, the engine will look for the material file


<game folder>/materials/models/username/modelname/coolTexture.vmt

when rendering the model.

Thank you! I’ll try that when I get home.

My model is DMX, though, if that makes any difference. I should’ve known about the $basetexture thing, though. Maybe that was all.