STEAM GROUP
Blender Tutorial Community BlenderTuts
STEAM GROUP
Blender Tutorial Community BlenderTuts
24
IN-GAME
228
ONLINE
Founded
October 16, 2012
Language
English
Location
United States 
Cannot get texture to work on weapon model, and other various questions
I've made a weapon model, however when compiled, it shows no texture. when put into HLMV, it says "Model tried to load a VMT that isn't there" etc.

the QC:
$cd "C:\Users\Punchy\Desktop\coal\Compiled" $modelname "weapons/c_models/c_coaled_fury/c_coaled_fury.mdl" $model "body" "c_coaled_fury.smd" $cdmaterials "\models\weapons\c_items\" $surfaceprop "default" $sequence ref "ref" fps 30.00 $collisionmodel "phymodel.smd" { $mass 4.2 $inertia 1.00 $damping 0.00 $rotdamping 0.00 }
all the files related are in the "Compiled" folder seen at the top, the VMT and VTF are in the proper c_items folder. still cannot get it to work.

I haven't even begun to give it the viewmodel. oh boy.

Also, despite locking it to the vertex "weapon_bone", in HLMV it shows only "root"
Last edited by BTS | Justyn; Dec 6, 2013 @ 8:33pm
< >
Showing 1-15 of 19 comments
HellJumper Dec 6, 2013 @ 8:57pm 
Well firstly... viewmodels/worldmodels are outdated and not used anymore. You just make one "c_model" which covers both.

Assuming everything is placed in the correct folders like you mentioned, the problem probably lies in the material assignment from within blender. Can you open your .smd file with notepad++? Check to see that your material correctly shows up.

It should be a huge file with lines similar to this:

version 1 nodes 0 "weapon_bone" -1 1 "Hatchet" -1 end skeleton time 0 0 0.000000 0.000000 0.000000 0.000000 0.000001 0.000000 1 0.000000 -0.200152 -5.852165 0.000000 -0.036313 -1.570795 end triangles c_hatchet.tga 0 0.925649 0.661780 1.569788 0.420331 0.243965 0.873928 0.985834 0.622658 1 0 1.000000 0 0.708584 1.158801 1.496601 0.316141 0.368786 0.874081 0.982064 0.631578 1 0 1.000000 0 0.000521 0.295087 2.117128 0.000000 0.259133 0.965819 0.955777 0.620031 1 0 1.000000 c_hatchet.tga 0 1.001872 0.075503 1.656119 0.438246 0.131809 0.889126 0.985904 0.613467 1 0 1.000000 0 0.925649 0.661780 1.569788 0.420331 0.243965 0.873928 0.985834 0.622658 1 0 1.000000 0 0.000521 0.295087 2.117128 0.000000 0.259133 0.965819 0.955777 0.620031 1 0 1.000000

Notice the material name "c_hatchet.tga". Yours will be whatever your .vmt file is called with .tga appended to the end.

Also, in your QC file, make sure to change the last two items line to this:

$sequence ref "c_coaled_fury" fps 30.00 $collisionmodel "c_coaled_fury.smd" { $mass 4.2 $inertia 1.00 $damping 0.00 $rotdamping 0.00 }

If you don't see your material name listed in the .smd file, then all you should do is re-export your smd file from Blender making sure to export your model with a material.
BTS | Justyn Dec 6, 2013 @ 9:05pm 
That seems to have fixed the issue, and HLMV loads the VMT correctly, however now the weapon is invisible. Are there specific VTFEdit settings? I assume that's the problem, i just imported the origina .tga and then exported the VTF/VMT without changing any settings.
HellJumper Dec 6, 2013 @ 9:17pm 
Can you post your .vmt?
BTS | Justyn Dec 6, 2013 @ 9:19pm 
I've messed with the VTFEdit settings back when i made sprays and mods, etc and i'm just figuring i set some sort of settings that make the model see everything as invisible
Last edited by BTS | Justyn; Dec 6, 2013 @ 9:23pm
HellJumper Dec 6, 2013 @ 9:22pm 
Well just the code inside it.
BTS | Justyn Dec 6, 2013 @ 9:23pm 
"LightmappedGeneric"
{
"$basetexture" "models/weapons/c_items/c_coaled_fury.vtf"
}
HellJumper Dec 6, 2013 @ 9:25pm 
AHA.......

You'll be needing a different header:

"VertexLitGeneric" { "$basetexture" "models/weapons/c_items/c_coaled_fury" }

And make sure your vtf is named c_coaled_fury.vtf and inside the correct folder.
BTS | Justyn Dec 6, 2013 @ 9:29pm 
Yeah, that did the trick. Thanks a lifetime.

the weapon_bone seems to be on the top tip of the weapon rather than in the middle, where someone would hold it. i suppose i can crack it open in blender again to diagnose this.
HellJumper Dec 6, 2013 @ 9:36pm 
Yeah that just sounds like a bone positioning error. If you accidentally moved the bone, you can always just delete the old rig and re-import a fresh bone rig to work from.
BTS | Justyn Dec 6, 2013 @ 9:46pm 
Yep, that did the trick. just repositioned the model so the bone was where it needed to be. Thanks for all the help, i'll be sure to credit you for 100% of valve's cut :B1::B1::B1::B1:
BTS | Justyn Dec 6, 2013 @ 9:48pm 
Oh, another question. So i've got this model, Is there any special circumstance i need to fufill for it to be allclass/multi-class? or just upload it to the workshop with the desired characters marked?
HellJumper Dec 6, 2013 @ 9:51pm 
First post: Thanks :dealwithit:

Second post: I'm not sure actually. Are we talking about the weapon you just made? I assume that to make it all class you just make it useable by all classes (like the fying pan) and then just mark the corresponding characters on the workshop. Best of luck to you, though... Valve seems to be quite opposed to adding new weapons. All they ever add is hats/miscs now. I really can't wait for them to add official weapon support to the new beta importer.
BTS | Justyn Dec 6, 2013 @ 9:53pm 
I agree fully. I'm moreso making this as practice. Plus, McVee is potentially getting his own update, and he mentioned any weapons or hats that fit his movie pretty well would have a chance to get picked for the update too.
Flat Penguin Dec 8, 2013 @ 8:05am 
Hey guys. I have just manged to compile my weapon model in guistudiomdl (an abolute nightmare but its sorted now). It works perfectly in the model viewer. The model shows up textured. However when i try it in the itemtest map, the texture didn't appear.

@Pinch did you have this problem? how did you resolve it?

Thanks
Last edited by Flat Penguin; Dec 8, 2013 @ 8:05am
BTS | Justyn Dec 8, 2013 @ 10:25am 
dont think i did. never tried itemtest. is your vmt/vtf in the correct place your qcf says? are you checking the same model in both model viewer and itemtest, or 2 different locations
< >
Showing 1-15 of 19 comments
Per page: 1530 50