Model Textures

Sel

Banned
Feb 18, 2009
1,239
2,570
Hey, I recently started figuring out the process of exporting models to source, and tf2. Now while the model imports fine, the texture never seems to come through.

veh.jpg


Now, I'm guessing it's something in the QC file, or the shader/bitmap setup itself, as the texture is applied in 3ds.

Code:
$modelname "props_sel\TankBlue\TankBlue.mdl"

$cdmaterials "models\props_sel\TankBlue"

$scale 1.0
$surfaceprop "Metal"

$body "Body" "TankBlue"

$staticprop

$sequence "idle" "TankBlue_idle" fps 30

$collisionmodel "TankBlue_phys.smd"
{
	$mass 100
	$concave
}

I was told that the $cdmaterials command was supposed to point to the folder rather than the texture, but it would be nice if someone could confirm this. (The texture does not have the same name as the folder, however a VMF, and VTX files are created, so I'm not sure if that's a confirmation that the texture is found and compiled or not.

Rexy, it would be grand if your offer from a few days ago to give importing this stuff to source, and find where I went wrong a go is still open :)
 
Last edited:

SiniStarR

L8: Fancy Shmancy Member
Mar 31, 2009
585
116
check the vmf and make sure that its connecting to the vtf, that gets me alot when I do models.
 

Jimbomcb

L1: Registered
Feb 12, 2008
27
2
I was told that the $cdmaterials command was supposed to point to the folder rather than the texture, but it would be nice if someone could confirm this.

$cdmaterials should be set to the folder that contains the used materials
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
If you're using blender make sure you set the material properly. I'd take a screenshot of where you need to stick the texture name if i had it installed currently. You can perform a quick check of what texture its looking for in the .SMD by opening it as a standard text file. You'll see some header text then something like "material" (if done incorrectly) or <the texture name you set> followed by a load of numbers, then that repeated hundreds of times over.

If it says "material" you haven't named the material correctly (or at all) and it's going to look for "material.vmt" in the cdmaterials location.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
Yes, and the .vmt name should be the same as the model name. The VTF doesn't matter because its pointed to in the VMT, but its easier to have it named the same
 

Sel

Banned
Feb 18, 2009
1,239
2,570
If you're using blender make sure you set the material properly. I'd take a screenshot of where you need to stick the texture name if i had it installed currently. You can perform a quick check of what texture its looking for in the .SMD by opening it as a standard text file. You'll see some header text then something like "material" (if done incorrectly) or <the texture name you set> followed by a load of numbers, then that repeated hundreds of times over.

If it says "material" you haven't named the material correctly (or at all) and it's going to look for "material.vmt" in the cdmaterials location.

The SMD is referencing tankblueplaceholder.vtf in all the geometry lines, and I don't use blender, but there is a field similar to that in 3DS Max, but since the texture is referenced in the SMD, I'm guessing that it's not supposed to be included, or is taken from the bitmap path itself.

Yes, and the .vmt name should be the same as the model name. The VTF doesn't matter because its pointed to in the VMT, but its easier to have it named the same

This may be it, I'm guessing I need to recompile the model to see if it works though.

$cdmaterials should be set to the folder that contains the used materials

Thanks for confirming that.

check the vmf and make sure that its connecting to the vtf, that gets me alot when I do models.

The VMF appears to be referencing the texture.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Assuming that the material is in the folder 'TankBlue', your $cdmaterials line needs an extra backslash.

Code:
$cdmaterials "models\props_sel\TankBlue\"

And to eliminate the possibility that it's the SMD itself get the 3DSMax VTF plugin and assign your VTF to your model then re-export.
 
Last edited:

Sel

Banned
Feb 18, 2009
1,239
2,570
Assuming that the material is in the folder 'TankBlue', your $cdmaterials line needs an extra backslash.

Code:
$cdmaterials "models\props_sel\TankBlue\"

And to eliminate the possibility that it's the SMD itself get the 3DSMax VTF plugin and assign your VTF to your model then re-export.

Already installed :p

Also changing the QC file now, and gonna give compiling a go.

E: Ahhh, still no dice, though if Youme is right it's not on the 3ds side, and somewhere in the QC file or the model folder, any other ideas?
 
Last edited:

Tyker

L5: Dapper Member
Jun 1, 2009
232
142
23:11 - [AAGH] Tyker: and now
23:12 - [AAGH] Tyker: open up the vtf
23:12 - [AAGH] Tyker: in the correct directory!
23:12 - [AAGH] Tyker: wich should be:
23:12 - [AAGH] Tyker: tf\materials\models\props_sel\tankblue
23:12 - Selentic: where'd materials come from
23:13 - [AAGH] Tyker: WHAT

Is basically what went wrong, right there.