how do I attach .vmt and .vtf files to a model for Gmod.
7 replies, posted
So I made an ATM model in MODO, exported it as .smd, compiled it with .qc file where $cdmaterials is set to "models\materials",
made some textures and converted that to .vmt and .vtf files, put that in
F:\Steam\steamapps\common\GarrysMod\garrysmod\materials\models\materials and set the in the .vmt file wrote this
"$basetexture" "models/materials/Atm_txtr" (Atm_txtr is the exact name of the .vtf file)
Now the problem here is that when I enter Gmod and spawn my model
it doesn't have a texture and it's pink and black but I can still find and apply the texture I made to the prop. I want to know how do I make my prop
to have my texture set by default? It seems to me that I made everything correctly and there should be any problems but it doesn't work.
Help?
1. did you use vertexlitgeneric as the shader in the .vmt
2. why put models/materials in the .qc and not models/atm
3. is Atm_txtr the named texture in the .smd for the model ???
[QUOTE=taz0;52452706]1. did you use vertexlitgeneric as the shader in the .vmt
2. why put models/materials in the .qc and not models/atm
3. is Atm_txtr the named texture in the .smd for the model ???[/QUOTE]
1. Yes, I did use vertexlitgeneric as the the shader in the .vmt
2. I'm still new source stuff so I just followed tutorials on the internet and it resulted me putting that line in the .qc
3. What do you mean?
if you open the .smd with notepad ++ and scroll down to until the triangles line [code]triangles
gina_suit
3 -5.537214 -3.689608 53.302841 -0.977666 -0.082614 -0.193244 0.779053 0.642899 2 3 0.942137 2 0.057863
3 -4.641626 -2.155250 48.738220 -0.973230 -0.163034 -0.161997 0.717651 0.575806 1 3 1.000000
3 -5.674454 -4.957396 54.538910 -0.723253 -0.654279 0.220962 0.809967 0.654060 1 3 1.000000[/code] as you can see the textures named here is gina_suit you have to make sure the texture named in your .smd is the same as your .vtf on all parts
What if there is no texture at all?
triangles
Default.001
0 -11.714200 -5.346497 -21.002001 0.995788 -0.091617 0.000000 0.132124 0.455539 0
0 -11.714200 7.393497 19.511202 1.000000 0.000000 0.000000 0.243469 0.810482 0
0 -11.714200 -5.346503 19.511200 0.995788 -0.091617 0.000000 0.132124 0.810482 0
Edit: Nevermind, the texture is set as Default.001
[editline]10th July 2017[/editline]
I replaced everything compiled the .smd again and dobule checked everything and it doesn't work?
rename Default.001 to the name of your texture.vtf,, you should changed it in MODO realy
EDIT if you renamed the .vtf you also have to edit the name in the .vmt
The game will look for the .vmt with the name you set, not the .vtf.
The .vtf to use is set by the .vmt file.
If your material name is set to "Default.001", the game will look for "materials/$cdmaterials/Default.001.vmt"
It worked... I have no idea what I did but I recompiled the model using taz0's .smd editing magic method and just carefully redid everything again and it works!
Sorry, you need to Log In to post a reply to this thread.