I am making a custom model and I have been having some trouble with linking the textures (results in pink/purple and black checkers)
This is what I have so far
QC:
$cdmaterials "models\player\combinevg\"
in the folder 'combinevg' i have my vmt and vtf (both called 'combinevg' + 'combinevg_head')
vmt:
"VertexlitGeneric"
{
"$basetexture" "models\player\combinevg\combinevg"}
When I run MDLTextureInfo I get this:
GENERAL INFO
============
Model File: C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\combinevg\models\player\combinevg\combinevg.mdl
Internal Name: "combinevg.mdl"
ID Tag: 1414743113
Version: 48
Length: 21808 bytes
CRC: 43B57D3A
Number of Textures: 2
Number of Textures Paths: 1
TEXTURE NAMES
=============
Texture 1 - "combinevg_head.vmt"
Texture 2 - "combinevg.vmt"
TEXTURE FOLDER(S)
=================
Texture path 1 - "<Mod Folder>\materials\models\player\combinevg\"
And in the HLMV I get
*** ERROR *** Model attempted to load one or more VMT s it can't find.
combinevg.qc
I am told that it is looking in the right folder, and the files are there inside the folder, but I still get errors. Does anybody know why?
Yes quite the pickle, assuming there's no spelling error and that the path is actually materials/models/player/combinevg/ then it should be searching correctly, since the HLMV is the one that's giving you the error it means that the problem can be narrowed down, in this case it can mean 2 things (I never got the error but at this point it's either):
HLMV doesn't find the VMT in the materials folder, HLMV looks for the Garrysmod/garrysmod/materials folder, so if it's not there it won't show up in the viewer.
The names of the materials in the model itself are wrong, the model needs to have its materials named after the vmt, so when it searches the cdmaterials it will look for the vmts named after the ones in the model.
Just remember that for it to be viewed both in game and in HLMV the material needs to be in the garrysmod/materials folder, your CDMaterials must have the path file of where to look materials INSIDE the materials folder, the names of the materials in the model will be which one are which so there's not much margin for errors or bugs.
I copied my materials/models/player/combinevg/ over to the Garrysmod/garrysmod/materials folder and the textures now show up both in HLMV and in-game (except for thumbnail but that doesnt matter)
The material names in the model itself were correct which was shown by MDLTextureInfo
Thanks for you help! I am wondering though, if I compile into a GMA and upload it to the workshop (original file 'combinevg/') will the textures work since I fixed it by copying them to my garrysmod materials folder. Or is there another step I need to do for it to be workshop-ready?
Thank you, Endus
To make a GMA you need the addon folder, and the addon folder is just like the garrysmod folder, if the problem was because the materials weren't inside of the garrysmod folder then there should be no problem uploading the addon folder if it contains the correct files (material and models, lua if necessary).
The worst thing that can happen is that you try it in game and it doesn't work, after that you just fix it so there's no need to stress out a perfect release.
Sorry, you need to Log In to post a reply to this thread.