Simply put, the texture won't work on my custom Gmod prop, it only comes up with the standard missing texture material.
I've checked an rechecked the path before compiling but not matter what I change the path to it doesn't work. The files use the same names as the textures in Blender.
I've also looked at many tutorials and they all do exactly what I did.
I really think I've checked everything, but knowing myself I missed a little detail somewhere.
To make testing easy, I'm using the Extended Spawnmenu and the files are in a folder in the addon directory of Gmod.
The mod folder includes materials/models/upa and models/upa.
All textures (vmt and vtf) are in the innermost materials folder and the compiled model in the innermost models folder.
QC file:
[CODE]$modelname upa\upa01.mdl
$body studio "upa01.smd"
$scale 1.0
$staticprop
$surfaceprop metal
$cdmaterials "models\upa"
$sequence idle "upa01_idle"
$collisionmodel "upa01_phys.smd"
{
$mass 0.5
}
$keyvalues
{
"prop_data"
{
"base" "Metal.Small"
}
}
[/CODE]
VMT file:
[CODE]"VertexlitGeneric"
{
"$basetexture" "models/upa/upa01"
"$model" 1
}
[/CODE]
Ingame Screenshot (everything works including the model, physics, prop data, etc):
[IMG]http://i.imgur.com/L240IR5.png[/IMG]
Make sure your reference .SMD file actually has the proper .VTF/.VMT assigned to it. If the you have the texture files set in the right location and your $cdmaterials line pointing to that same location, then your model might have something else assigned to it (by name, of course; changing the name of the textures or using the same textures with a different name might cause the model to look for a .VMT of a different name). As a way to save time, you could try using a program called MDLTextureInfo to find out what it's looking for (simply drag your compiled .MDL file onto the executable, and it will show you a list of assigned materials on your model in a command prompt window as a result).
[editline]8th December 2014[/editline]
[QUOTE=Katra804;46670319]Make sure your reference .SMD file actually has the proper .VTF/.VMT assigned to it. If the you have the texture files set in the right location and your $cdmaterials line pointing to that same location, then your model might have something else assigned to it (by name, of course; changing the name of the textures or using the same textures with a different name might cause the model to look for a .VMT of a different name). As a way to save time, you could try using a program called MDLTextureInfo to find out what it's looking for (simply drag your compiled .MDL file onto the executable, and it will show you a list of assigned materials on your model in a command prompt window as a result).[/QUOTE]
Thanks a lot.
Evidently it was trying to use the name of the material from Blender instead of the actual file loaded, which I should have noticed.
Hope you don't mind if I ask another quick question.
When I change the scale in the qc and then compile the collision for the prop changes but the model does not change scale with it. Do you know what could cause this?
I'm not sure on that one, unfortunately. Someone else might be able to help with that, though.
Sorry, you need to Log In to post a reply to this thread.