Source Filmmaker

Source Filmmaker

Shius Jul 8, 2014 @ 7:29am
Texture error [CMaterial::PrecacheVars: error loading vmt file for...] when loading custom model
So I made this really simple ticket model for a short that I'm doing (1/3rd finished, as of writing this), and succesfully compiled it to SFM. However, there's been a consistent missing texture error (that pink and black checkered thing) whenever I load it up, and upon looking at the console, the persumed error casuing my problems read:

CMaterial::PrecacheVars: error loading vmt file for models/shius/props/ticket/ticket_1

Anyone know what this error is, or how to fix it? The information I've found online isn't awfully helpful.
< >
Showing 1-11 of 11 comments
Ruschca Jul 8, 2014 @ 8:00am 
When you made the texture for the ticket (in .vtf format, presumably in VTFEdit), did you make a .vmt file to go with it? (There's an option in VTFEdit to have it automatically be created, but I could have sworn that it's on by default.)
Shius Jul 8, 2014 @ 9:50am 
No it wasn't on by default, but I found out I needed it on by the second time. No, the automatic .vmt creation didn't work, and I'm guessing that the problem is somewhere there. Would it be helpful if I post a copy of the vmt?
R234 Jul 8, 2014 @ 11:41am 
It very much would.
raptornx01 Jul 8, 2014 @ 1:39pm 
also, is the texture in the folder shown?
Shius Jul 9, 2014 @ 2:39am 
Here's the .vmt text where the error was originally shown.

"$basetexture" "models/Shius/props/ticket/ticket_72.vtf"}

I have two materials for this model, but both had basically the same text, spare the .vtf name.

I'm not entirely sure what you mean by that. If it means that I can open with VTFEdit, then yes, it is shown.
Shius Jul 9, 2014 @ 2:45am 
Update on the error.

So I tried fiddling around with the .vmt file, but I think I ♥♥♥♥ed something up, 'cause now the error's completely changed.
From the last error, it's turned into

props_medicinalpractice\waiting_ticket.mdl : material "models/shius/props/ticket/material" not found.

which is, although a relatively simpler problem, is confusing because I have all of my materials in that directory. [usermod/materials/models/shius/props/ticket/material]

Can I get any help on this?
Ruschca Jul 9, 2014 @ 2:47am 
Just to clarify, the .vmt is in the same folder as the .vtf, correct? materials/models/shius/props/ticket?
Also, what's the new vmt?
Last edited by Ruschca; Jul 9, 2014 @ 2:48am
Shius Jul 9, 2014 @ 2:59am 
Yup. the .vmt and .vtf's are both in [materials/models/shius/props/ticket/material]

I haven't moved the vmt, but I tried editting the text to ["$basetexture" "models/Shius/props/ticket/material/ticket_72.vtf"] from ["$basetexture" "models/Shius/props/ticket/ticket_72.vtf"] then changed it back when I still got the texture error.
Shius Jul 9, 2014 @ 7:44am 
Gahh, you know what? I'll just give up on this for now and re-texture another flat model.

As much as I'd like to continue, this is way to time-consuming for just the practice short that I'm doing. It'll probably be best if I just give up now, and try again another time.

Thanks for the help so far. :)
R234 Jul 9, 2014 @ 12:06pm 
Lightmappedgeneric is the wrong shader to use for a model. Try vertexlitgeneric.
Shius Jul 10, 2014 @ 8:07am 
Re-wrote it as you said, but it didn't work. Thanks anyway.
< >
Showing 1-11 of 11 comments
Per page: 15 30 50

Date Posted: Jul 8, 2014 @ 7:29am
Posts: 11