Where do the textures go?

FictiousWill

Newbie
Joined
Jul 22, 2003
Messages
2,658
Reaction score
1
I exported a custom weapon view model, but it shows up purple checkered in hlmv. I put the .vtfs in the folder with the mdl, and then tried putting them in the materials folder, then in the materials folder under foldernames identical to that of the model. What gives?
 
they go in the materials folder, and from there...wherever you told the qc file the materials were going to go...
 
Yeah, I specified $cdmaterials "weapons\modelname" but they don't show up.

Edit: holdon holdon.... damn vmts

edit2: Nope, now all I have is cubemapped purple checkers. Damn.
 
Why sure:

torch.qc:
Code:
$hboxset "default"
$hbox 0 "ValveBiped.Bip01_Spine4" 0.000  0.000  -1.938  2.033  1.001  1.938
$hbox 0 "ValveBiped.Bip01_L_Forearm" 0.000  -2.880  -3.014  11.482  2.540  2.542
$hbox 0 "ValveBiped.Bip01_L_Hand" -0.940  -1.938  -2.103  4.304  0.992  1.887
$hbox 0 "ValveBiped.Bip01_L_Finger3" 0.000  -0.778  -0.625  1.826  0.400  0.439
$hbox 0 "ValveBiped.Bip01_L_Finger0" 0.000  -0.455  -1.279  1.790  1.123  0.686
$hbox 0 "ValveBiped.Bip01_L_Finger01" 0.000  -0.384  -0.712  1.275  0.876  0.361
$hbox 0 "ValveBiped.Bip01_R_Forearm" -1.936  -3.135  -2.711  11.482  2.550  3.047
$hbox 0 "ValveBiped.Bip01_R_Hand" -0.847  -2.781  -2.009  6.115  1.043  2.113
$hbox 0 "ValveBiped.Bip01_R_Finger0" 0.000  -0.468  -0.000  2.212  0.962  1.217
$hbox 0 "ValveBiped.Bip01_R_Finger01" 0.000  -0.358  -0.568  1.261  1.035  0.696
$hbox 0 "ValveBiped.base" -0.738  -3.635  -4.366  0.783  3.122  5.938
$hbox 0 "ValveBiped.square" -0.704  -0.635  -4.287  0.672  1.017  4.029
$hbox 0 "ValveBiped.clip" -0.711  -2.509  -1.420  0.517  2.634  1.139
// Model uses material "v_hand_sheet.vmt"
// Model uses material "v_pistol_sheet.vmt"
$attachment "muzzle" "ValveBiped.muzzle" -0.00 -0.00 -0.00 rotate -0.00 -0.00 0.00
$attachment "1" "ValveBiped.eject" -1.00 -0.00 -0.00 rotate -0.00 90.00 180.00
$surfaceprop "default"
$illumposition 12.972 0.702 -35.781
$sequence idle01 "idle01" loop ACT_VM_IDLE 1 fps 30.00 node 0
$modelname "weapons\torch\v_Pistol.mdl"
$cdmaterials "weapons\torch"
$model "studio" "Pistol_reference.smd"

v_hand_sheet.vmt
Code:
"VertexLitGeneric"
{
	"$baseTexture" "Models/Weapons/torch/v_hand_sheet.vtf"
	"$envmap" "env_cubemap"
	"$normalmapalphaenvmapmask" 1
	"$selfillum" "1"
}

v_pistol_sheet.vmt
Code:
"VertexLitGeneric"
{
	"$baseTexture" "Models/Weapons/torch/v_pistol_sheet.vtf"
	"$envmap" "env_cubemap"
	"$normalmapalphaenvmapmask" 1
	"$selfillum" "1"
}

Where do I put the vmts and vtfs so they show up on the model in hlmv?
 
What kind of model is this? and the whole model is covered in the chequered texture?

I think it might be something in the qc...I'm not really certain what though...
 
HLMV finds the vmts. I've figured that out. If I comment out the cubemap line in the vmts the model in hlmv is no longer cubemapped. So why is the texture not loading? I assume it's just because it's in the wrong place.
 
How is it 'cubemapped'? Reflective?

What are the full directories of the models and textures then?
 
The .mdl, vtx's and vvd are here:
C:\Steam\SteamApps\SourceMods\MyMod\models\weapons\torch

And the vtf's and vmt's are here:
C:\Steam\SteamApps\SourceMods\MyMod\materials\weapons\torch
 
GonzoBabbleshit said:
How is it 'cubemapped'? Reflective?

I'm still not convinced the qc file is right...I've been looking at getting weapon models ingame and the Valve qc's look very different. In layout if nothing else...could be worth investigating?
 
Yeah I just rewrote the .qc to this:
Code:
$modelname "weapons\torch\v_Pistol.mdl"
$cdmaterials "weapons\torch"
$body studio "Pistol_reference.smd"
$origin 0 0 68
$sequence idle01 "Idle01" loop fps 30 activity ACT_VM_IDLE 1 node 0

Same problems as above.

I am recompiling the model each time, so it's not using an old mdl.
Commenting out the "$envmap" "env_cubemap" line affects the hlmv model still.
Commenting it out in the hand texture removes the hand cubemapping, and the same for the weapon, so the textures are assigned to the mesh correctly.
 
Fixed it! I was using this program called HL2 Compile Toolkit, and it was cutting apart my .qc files, destroying the file paths. I used my own custom .bat for studiomdl.exe and suddenly everything worked.

Thanks for the help, after looking at the valve .qc's I learned quite a bit too.
 
I recommend downloading GuiStudioMdl from here. It's for HL1, but if you install it and move the guistudiomdl.exe to your 'sourcesdk\bin' folder it works fine.

It works really well, and saves a lot of hassle :thumbs:
 
It's just a GUI (Graphical User Interface) for StudioMdl (which compiles the models).
 
Back
Top