custom made gun model in game is invisible or not there
21 replies, posted
so i made my first go at a gun model (its not good xP) its a test and when i put the model in game (Gmod) there are no errors but the hand is were its suppose to be but the gun is like invisible or just there
[IMG]http://images.akamai.steamusercontent.com/ugc/513756752758389628/656E060830B04556E1D1169E67B152C562174A42/[/IMG]
dont mind the hud its just a gamemode am working on
could i get some help with this?
i take it, if you fire the gun you get muzzle flash in mid air: post your .vmt for the guns material
[QUOTE=taz0;48040822]i take it, if you fire the gun you get muzzle flash in mid air: post your .vmt for the guns material[/QUOTE]
"LightmappedGeneric"
{
"$basetexture" "Jenssons/noodas"
}
is this what you were looking for?
you should use VertexLitGeneric on models [url]https://developer.valvesoftware.com/wiki/VertexLitGeneric[/url]
also look at [url]https://developer.valvesoftware.com/wiki/Materials_for_models#Compiling_your.VMT_:_Valve_Material_Type[/url]
[QUOTE=taz0;48041106]you should use VertexLitGeneric on models [url]https://developer.valvesoftware.com/wiki/VertexLitGeneric[/url]
also look at [url]https://developer.valvesoftware.com/wiki/Materials_for_models#Compiling_your.VMT_:_Valve_Material_Type[/url][/QUOTE]
"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
"$bumpmap" "Jenssons/noodas_nomral"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$model" 1
"$selfillum" 1
}
like this?
yeah
[QUOTE=Jenssons;48041320]"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
"$bumpmap" "Jenssons/noodas_nomral"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$model" 1
"$selfillum" 1
}
like this?[/QUOTE]
Not exactly this is what you should use for the barebones of any vmt for a model.
[code]
"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
}
[/code]
The rest of the keyvalues should be added as you need them. If you have a normal map then [URL="https://developer.valvesoftware.com/wiki/$normalmap"]$bumpmap[/URL] should be added and so on.
[QUOTE=Sally;48041551]Not exactly this is what you should use for the barebones of any vmt for a model.
[code]
"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
}
[/code]
The rest of the keyvalues should be added as you need them. If you have a normal map then [URL="https://developer.valvesoftware.com/wiki/$normalmap"]$bumpmap[/URL] should be added and so on.[/QUOTE]
there is still no gun in the hand ;-;
[QUOTE=Jenssons;48041320]"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
"$bumpmap" "Jenssons/noodas_nomral"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$model" 1
"$selfillum" 1
}
like this?[/QUOTE]
idk if your file is named "noodas_nomral" but normal is misspelled, this might be a syntax error go ahead and check all your paths and qc file.
[QUOTE=dillonbarba;48041786]idk if your file is named "noodas_nomral" but normal is misspelled, this might be a syntax error go ahead and check all your paths and qc file.[/QUOTE]
its the name of the file
(am dyslexic)
how does the $cdmaterials bit of the .qc look is it like $cdmaterials "Jenssons/noodas" or $cdmaterials "models/Jenssons/noodas" ?
[QUOTE=taz0;48041843]how does the $cdmaterials bit of the .qc look is it like $cdmaterials "Jenssons/noodas" or $cdmaterials "models/Jenssons/noodas" ?[/QUOTE]
$cdmaterials "Jenssons"
[QUOTE=Jenssons;48042130]$cdmaterials "Jenssons"[/QUOTE]
if the .vmt and .vtf are in jenssons/noodas then you need to show that in the .qc too, so $cdmaterials "Jenssons/noodas"
[QUOTE=taz0;48042194]if the .vmt and .vtf are in jenssons/noodas then you need to show that in the .qc too, so $cdmaterials "Jenssons/noodas"[/QUOTE]
its in the folder Jenssons the file is noodas
The problem mostly lies within the animation set from what I can tell. Whenever a model can't find its textures, it takes on the purple-black texture bug (as is customary for the Source engine); based on what you've described in your following posts after editing the .VMT, what you're experiencing sounds like it might be due to a broken animation set (which is fairly common for most of the recent animation sets anymore when they are decompiled). The only work-around that I'm aware of is to only use the reference .SMD file from what you've decompiled, and then have the .QC use the compiled .MDL (the one you originally decompiled) with the $includemodel command.
[QUOTE=Katra804;48042650]The problem mostly lies within the animation set from what I can tell. Whenever a model can't find its textures, it takes on the purple-black texture bug (as is customary for the Source engine); based on what you've described in your following posts after editing the .VMT, what you're experiencing sounds like it might be due to a broken animation set (which is fairly common for most of the recent animation sets anymore when they are decompiled). The only work-around that I'm aware of is to only use the reference .SMD file from what you've decompiled, and then have the .QC use the compiled .MDL (the one you originally decompiled) with the $includemodel command.[/QUOTE]
ok well the model is now in game :D but yeah it cant find the texture also the gun is to high for some unknow reason D: any help?
[IMG]http://images.akamai.steamusercontent.com/ugc/622969238668316026/004FA6D7EEF06A361910CC819266946F5E756CB2/[/IMG]
You might have to adjust the position of the weapon model itself in the reference file to get it back into the right position. As for the broken textures, your .QC is automatically assuming that the textures are located in 'materials\jenssons'; move your .VMT and .VTF files to that location if they aren't already (the $cdmaterials line automatically assumes that the base 'materials' folder is the main directory, so typing '$cdmaterials "jenssons"' into that makes it read as 'materials\jenssons' when compiled), and then make the appropriate adjustments to the .VMT as necessary.
[QUOTE=Katra804;48042999]You might have to adjust the position of the weapon model itself in the reference file to get it back into the right position. As for the broken textures, your .QC is automatically assuming that the textures are located in 'materials\jenssons'; move your .VMT and .VTF files to that location if they aren't already (the $cdmaterials line automatically assumes that the base 'materials' folder is the main directory, so typing '$cdmaterials "jenssons"' into that makes it read as 'materials\jenssons' when compiled), and then make the appropriate adjustments to the .VMT as necessary.[/QUOTE]
am sorry am going to be a noob what do you mean by "reference file" also the textures are in the right folder see
[IMG]https://dl.dropboxusercontent.com/u/192258276/help2.png[/IMG][IMG]https://dl.dropboxusercontent.com/u/192258276/help.png[/IMG]
and this is my .QC if this help
[code]
$modelname "weapons\c_tutorial_gun.mdl"
$bodygroup "studio"
{
studio "silencer001037.smd"
}
$proceduralbones c_arms_vrd.vrd
$cdmaterials "Jenssons"
$surfaceprop "default"
$contents "solid"
$illumposition 3.995 -9.538 -6.393
$bbox -9.089 -11.527 -13.175 24.027 7.405 0.169
$cbox 0 0 0 0 0 0
$hboxset "default"
$sequence "idle" "anims\idle.smd" {
fps 30
"ACT_VM_IDLE" 1
loop
snap
node "Ready"
}
$sequence "shoot" "anims\shoot.smd" {
fps 30
snap
"ACT_VM_PRIMARYATTACK" 1
{ event 5001 0 "1" }
{ event 6001 0 "1" }
}
$sequence "reload" "anims\reload.smd" {
fps 30
snap
"ACT_VM_RELOAD" 1
{ event 5004 15 "Weapon_tutorial.Magout" }
{ event 5004 57 "Weapon_tutorial.Magin" }
}
$sequence "draw" "anims\draw.smd" {
fps 30
snap
"ACT_VM_DRAW" 1
}
$bonemerge "ValveBiped.Bip01_Spine4"
$bonemerge "ValveBiped.Bip01_L_Clavicle"
$bonemerge "ValveBiped.Bip01_L_UpperArm"
$bonemerge "ValveBiped.Bip01_L_Forearm"
$bonemerge "ValveBiped.Bip01_L_Hand"
$bonemerge "ValveBiped.Bip01_L_Wrist"
$bonemerge "ValveBiped.Bip01_L_Finger4"
$bonemerge "ValveBiped.Bip01_L_Finger41"
$bonemerge "ValveBiped.Bip01_L_Finger42"
$bonemerge "ValveBiped.Bip01_L_Finger3"
$bonemerge "ValveBiped.Bip01_L_Finger31"
$bonemerge "ValveBiped.Bip01_L_Finger32"
$bonemerge "ValveBiped.Bip01_L_Finger2"
$bonemerge "ValveBiped.Bip01_L_Finger21"
$bonemerge "ValveBiped.Bip01_L_Finger22"
$bonemerge "ValveBiped.Bip01_L_Finger1"
$bonemerge "ValveBiped.Bip01_L_Finger11"
$bonemerge "ValveBiped.Bip01_L_Finger12"
$bonemerge "ValveBiped.Bip01_L_Finger0"
$bonemerge "ValveBiped.Bip01_L_Finger01"
$bonemerge "ValveBiped.Bip01_L_Finger02"
$bonemerge "ValveBiped.Bip01_R_Clavicle"
$bonemerge "ValveBiped.Bip01_R_UpperArm"
$bonemerge "ValveBiped.Bip01_R_Forearm"
$bonemerge "ValveBiped.Bip01_R_Hand"
$bonemerge "ValveBiped.Bip01_R_Wrist"
$bonemerge "ValveBiped.Bip01_R_Finger4"
$bonemerge "ValveBiped.Bip01_R_Finger41"
$bonemerge "ValveBiped.Bip01_R_Finger42"
$bonemerge "ValveBiped.Bip01_R_Finger3"
$bonemerge "ValveBiped.Bip01_R_Finger31"
$bonemerge "ValveBiped.Bip01_R_Finger32"
$bonemerge "ValveBiped.Bip01_R_Finger2"
$bonemerge "ValveBiped.Bip01_R_Finger21"
$bonemerge "ValveBiped.Bip01_R_Finger22"
$bonemerge "ValveBiped.Bip01_R_Finger1"
$bonemerge "ValveBiped.Bip01_R_Finger11"
$bonemerge "ValveBiped.Bip01_R_Finger12"
$bonemerge "ValveBiped.Bip01_R_Finger0"
$bonemerge "ValveBiped.Bip01_R_Finger01"
$bonemerge "ValveBiped.Bip01_R_Finger02"
[/code]
The reference file is the .SMD file that contains the weapon model. As for the texture files, the .VMT must be pointing to the wrong location if it can't find the texture. Make sure that it's pointing to the right location with the $basetexture line.
[QUOTE=Katra804;48043090]The reference file is the .SMD file that contains the weapon model. As for the texture files, the .VMT must be pointing to the wrong location if it can't find the texture. Make sure that it's pointing to the right location with the $basetexture line.[/QUOTE]
"VertexLitGeneric"
{
"$basetexture" "Jenssons/noodas"
}
it seems to be right to me
Where are the compiled model files located? Something isn't adding up here.
[QUOTE=Katra804;48043160]Where are the compiled model files located? Something isn't adding up here.[/QUOTE]
the model is in gmod/models/weapons also i have the gun in the right place now :D
Sorry, you need to Log In to post a reply to this thread.