Compiling from XSI, no textures.

I’ve done just about everything I can think of. I’ve put the VTF and VMT in every folder it could possibly be looking for. I changed the material on the prop to be a lambert instead of a phong. I exported it both from Photoshop and from VTFEdit. I made sure I compiled in the correct DXT format. I compiled for EP2, EP1, and HL2. It works in Hammer so the texture itself is valid. I have compiled it in GUIStudioMdl2.

This problem has persisted over multiple computers and multiple models and textures of varying detail and scale and I need to solve this problem if the mod I am helping produce will ever get any custom models in.

I’ve gone over and over and over the QC file and I don’t see anything wrong. What could I possibly be doing wrong, Facepunch?

QC File:



$modelname	"lighthouse.mdl"
$cdmaterials              "/"
$body "cube" "lighthouse.smd"
$staticprop
$surfaceprop  Metal

//-----Animation Sequences-----
$sequence	"idle"	lighthouse-ref.smd	fps 30

//-----Collision Info-----
$collisionmodel	"lighthouse-phys.smd"
{
	$automass
	$concave
}


VMT file:



"VertexlitGeneric"
{
	"$basetexture" "stamp"
	"$surfaceprop" "Metal"
	"$translucent" "1"
}


What is the actual issue, are there no textures showing (as in model is invisible)?
Are the textures pink and black squares instead of what it should be?
Or is the model not finding the textures?

For all or any of the above, check the .mdl by opening it in Crafty, a Hex editor or another thing that lets you see material paths to see where the material path is going (as you haven’t seemed to have defined one in the QC shown above). If your materials are not where its looking or not called what it says they are, thats your problem (I had that issue when porting stuff earlier). If all those look ok check your VMT is refering to the texture in its correct directory (usual error when i’m hexing to forget to change them).

If all this fails try compiling it all with the .smd parts just defined as your lighthouse.smd (instead of different ones for each) as this works for me (though i’ve found that studiomdl is the only one that seems to be able to process that).

well if you look at his QC, he’s told the compiler “my textures are;” nowhere

then in the VMT he’s told the game that there is no texture for that material

VMT = Valve Material File
VTF = Valve Texture File

a material can combine several textures into one, example normal maps, and a diffuse map.

your texture you used on your model, no becomes the name of the material.

so if you had a model apple, and you used the texture green.jpg

your VMT would need to be called green.vmt and in that vmt you must type the full path of where the actual texture file is.

so theres actually alot of problems why your attempt didn’t work and why there are no materials.

Whats the code for a diffuse map?

Edit: Also what is a mask and an instance constant? (These are all materials from UT3 models I don’t know what to do with).

It’s all relative to the materials directory though. Only issue would be that it’s not pointed somewhere in materials/models.

But stamp.vtf is the texture, and I pointed the engine to it with $basetexture?

Relative to the VMT, the root of the game directory…?

I thought, as HiddenMyst indicated, that cdmaterials simply specifies where in the materials directory the files are. I wanted them to be in materials’ root, or “materials/” so I figured that was how I pointed to them.