Texture issue

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
I know this isn't strictly mapping related, but this is the only place I know that I will get a proper, quick response..

When I've compiled my model and such, ingame the texture isn't working properly. I have no idea why, as the .VMT and .VTF are properly done, and such. See for yourself:

{
"$baseTexture" "models\weapons\c_items/c_skistick"


"$phong" "1"
"$phongexponent" "5"
"$phongboost" "10"
"$lightwarptexture" "models\weapons\c_items/c_ambassador_lightwarp"
"$phongfresnelranges" "[.25 .5 1]"
// "$phongwarptexture" "models\weapons\c_items/c_ambassador_phongwarp"
"$basemapalphaphongmask" "1"


"$rimlight" "1"
"$rimlightexponent" "10"
"$rimlightboost" "1"

"360?$color2" "[ 0.9 0.8 0.8 ]"


"$glowcolor" "1"

// Cloaking
"$cloakPassEnabled" "1"
"$sheenPassEnabled" "1"

"$sheenmap" "cubemaps\cubemap_sheen001"
"$sheenmapmask" "Effects\AnimatedSheen\animatedsheen0"
"$sheenmaptint" "[ 1 1 1 ]"
"$sheenmapmaskframe" "0"
"$sheenindex" "0"

"$yellow" "0"

"Proxies"
{
"AnimatedWeaponSheen"
{
"animatedtexturevar" "$sheenmapmask"
"animatedtextureframenumvar" "$sheenmapmaskframe"
"animatedtextureframerate" "40"
}
"invis"
{
}
"ModelGlowColor"
{
"resultVar" "$glowcolor"
}
"Equals"
{
"srcVar1" "$glowcolor"
"resultVar" "$selfillumtint"
}
"Equals"
{
"srcVar1" "$glowcolor"
"resultVar" "$color2"
}
"YellowLevel"
{
"resultVar" "$yellow"
}
"Multiply"
{
"srcVar1" "$color2"
"srcVar2" "$yellow"
"resultVar" "$color2"[/im
}
}

the location of the files: C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\custom\CWeapons\models\weapons\c_items
 

VEssex

L2: Junior Member
May 19, 2016
63
83
Go to your model in HLMV with the tab set to “model”, there are a variety of things you need to check.

  • Can it find the .vmt? If not HLMV will return an error.
  • Did you assign materials to the mesh whilst in Blender?
  • Is the .vtf header correct? Should be 7.2.
  • Is $cdmaterials correct? Should not have “materials/“ in it.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
Go to your model in HLMV with the tab set to “model”, there are a variety of things you need to check.

  • Can it find the .vmt? If not HLMV will return an error.
  • Did you assign materials to the mesh whilst in Blender?
  • Is the .vtf header correct? Should be 7.2.
  • Is $cdmaterials correct? Should not have “materials/“ in it.
HLMV is returning a checkerboard texture
The material in blender for the UV map is the same name as used in the .VTF
EDIT: Yes, the header is 7.2
$cdmaterials "models\weapons\c_items"
 
Last edited:

VEssex

L2: Junior Member
May 19, 2016
63
83
HLMV is returning a checkerboard texture
The material in blender for the UV map is the same name as used in the .VTF
EDIT: Yes, the header is 7.2
$cdmaterials "models\weapons\c_items"
So I presume HLMV is returning an error where it cannot find the .vmt. Correct?
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
So I presume HLMV is returning an error where it cannot find the .vmt. Correct?
Yes. It says 'Model attempted to load 1 or more VMTs that it couldn't find'
 

VEssex

L2: Junior Member
May 19, 2016
63
83
Yes. It says 'Model attempted to load 1 or more VMTs that it couldn't find'
Okay good, check the “$modelname” and make sure there is no “model/“ in it.
Otherwise, post your .qc if you checked to no avail.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
Okay good, check the “$modelname” and make sure there is no “model/“ in it.
Otherwise, post your .qc if you checked to no avail.
$modelname "weapons\c_models\c_battleaxe\c_battleaxe.mdl"
Would this be good, or do I need to do just c_battleaxe\c_battleaxe.mdl?
 

VEssex

L2: Junior Member
May 19, 2016
63
83
$modelname "weapons\c_models\c_battleaxe\c_battleaxe.mdl"
Would this be good, or do I need to do just c_battleaxe\c_battleaxe.mdl?
Should be fine just the way it is.
But please post your .qc or PM me your model, I can solve it a bit faster from my end and can inform you on what you did wrong.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
$modelname "weapons\c_models\c_battleaxe\c_battleaxe.mdl"

$bodygroup "Body"
{
studio "c_battleaxe.smd"
}


$surfaceprop "metal"

$contents "solid"

$maxeyedeflection 90

$cdmaterials "models\weapons\c_items"

$cbox 0 0 0 0 0 0

$bbox -2.138 -9.86 -10.895 2.172 9.844 46.171

$definebone "weapon_bone" "" 0 0 0.00047 0 0 89.999983 0 0 0 0 0 0


$sequence "idle" {
"anims\idle.smd"
fadein 0.2
fadeout 0.2
fps 30
}

$collisionmodel "c_battleaxe_physics.smd"
{
$mass 6.306724
$inertia 1
$damping 0
$rotdamping 4
$rootbone " "

}
[/SPOLER]
 

VEssex

L2: Junior Member
May 19, 2016
63
83
Looks fine.

And check your materials in Blender again, the material should match the .vmt name (not texture name) w/o extension.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
Looks fine.

And check your materials in Blender again, the material should match the .vmt name (not texture name) w/o extension.
In blender, the texture name being used is c_skistick - same as the .VMT
 

VEssex

L2: Junior Member
May 19, 2016
63
83
In blender, the texture name being used is c_skistick - same as the .VMT
Alright, this is the point where I’d like to ask if I can debug your model on my end if you don’t mind.

Edit: I believe I have solved it
 
Last edited: