STEAM-GRUPPE
Blender Tutorial Community BlenderTuts
STEAM-GRUPPE
Blender Tutorial Community BlenderTuts
14
I SPIL
167
ONLINE
Grundlagt:
16. oktober 2012
Sprog:
Engelsk
Lokation:
United States 
BTS | Justyn 6. dec. 2013 kl. 20:32
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"
Sidst redigeret af BTS | Justyn; 6. dec. 2013 kl. 20:33
< >
Viser 1-15 af 19 kommentarer
HellJumper 6. dec. 2013 kl. 20:57 
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 6. dec. 2013 kl. 21:05 
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 6. dec. 2013 kl. 21:17 
Can you post your .vmt?
BTS | Justyn 6. dec. 2013 kl. 21:19 
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
Sidst redigeret af BTS | Justyn; 6. dec. 2013 kl. 21:23
HellJumper 6. dec. 2013 kl. 21:22 
Well just the code inside it.
BTS | Justyn 6. dec. 2013 kl. 21:23 
"LightmappedGeneric"
{
"$basetexture" "models/weapons/c_items/c_coaled_fury.vtf"
}
HellJumper 6. dec. 2013 kl. 21:25 
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 6. dec. 2013 kl. 21:29 
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 6. dec. 2013 kl. 21:36 
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 6. dec. 2013 kl. 21:46 
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 6. dec. 2013 kl. 21:48 
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 6. dec. 2013 kl. 21:51 
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 6. dec. 2013 kl. 21:53 
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 8. dec. 2013 kl. 8:05 
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
Sidst redigeret af Flat Penguin; 8. dec. 2013 kl. 8:05
BTS | Justyn 8. dec. 2013 kl. 10:25 
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
< >
Viser 1-15 af 19 kommentarer
Per side: 1530 50