PDA

View Full Version : Team specific hat skins?


honeymustard
05-29-2010, 08:50 AM
I've made a hat for the scout, but I'm having trouble getting different skins for each team. I copied the qc settings from the batter's helmet, but I end up with this:

http://i47.tinypic.com/16lw9bp.jpg

As you can see, it blends the two skins, rather than choosing a specific one based on the team. Any idea how to do this properly?

YM
05-29-2010, 08:54 AM
$texturegroup skinfamilies
{
{ "models/weapons/w_medigun/w_medigun01.vmt" }
{ "w_medigun01_Blue.vmt" }
}
$hboxset "default"

in the qc


Also, next time dont waste one and a half million pixels to show us a hat that only uses 1,000

honeymustard
05-29-2010, 08:59 AM
$texturegroup skinfamilies
{
{ "models/player/items/scout/catchers_helmet_red.vmt" }
{ "catchers_helmet_blue.vmt" }
}
$hboxset "default"

That's in the qc file. So it must be something else.

Sorry about that large image. Fortunately the forum resizes them, so it really isn't a problem for anyone without a 56k modem.

edit: do you have to apply both textures when working in 3Ds Max? Or just the one? Because I only applied the red texture.

YM
05-29-2010, 09:57 AM
no thats what the QC is for, it finds the texture you've applied (hopefully catchers_helmet_red) and will replace it with the second line in the second skin.

The problem with the picture isn't that its huge, its the fact the subject is tiny, it's smaller than your avatar, how am I supposed to see what is going on?
I can't tell what is happening and do not know what kind of "blend" its doing.

Mick-a-nator
05-29-2010, 10:02 AM
Have you made sure that both textures are assigned to the model in your modelling program before exporting?

Nutomic
05-29-2010, 10:06 AM
Sorry about that large image. Fortunately the forum resizes them, so it really isn't a problem for anyone without a 56k modem.

Yeah it resizes them, which means everyone still has to download the whole image, it is just displayed smaller.

honeymustard
05-29-2010, 10:06 AM
no thats what the QC is for, it finds the texture you've applied (hopefully catchers_helmet_red) and will replace it with the second line in the second skin.

The problem with the picture isn't that its huge, its the fact the subject is tiny, it's smaller than your avatar, how am I supposed to see what is going on?
I can't tell what is happening and do not know what kind of "blend" its doing.

Just enlarge it ;) It's not like it's a big file. Anyway I will double check what's applied in Max. I definitely only applied the red texture, though, so do I have to apply both textures? Should I do multi/sub-object in Max?

edit: I changed the picture, how lovely.

http://i45.tinypic.com/1pytc6.png

There's one more picture, showing the blend a bit clearer.

Mick-a-nator
05-29-2010, 01:01 PM
As far as I know (Blender at least) you must assign BOTH textures as alternate textures.

EDIT: I think what's happening to your model is that the model is rendering the RED skin but the QC (rather the MDL from the compile, using information from the QC) is trying to render the BLUE texture. Hence z-fighting. Assign both textures and it should work.

YM
05-29-2010, 01:06 PM
Well I made all the models in the original swamp pack with loads of skins and I never did anything of the sort.

Only ever applied one texture then simply used the QC code I gave to get the other skins.

=/

Acumen
05-29-2010, 01:58 PM
no, you don't two textures applied. that can't be the issue.
you don't accidentally happen to have the model duplicated, do you ;)
how does it work in the model viewer ?
can you swap between the 2 skins without problems ?
can you show the entire qc file in here, please ?

what if you write this instead of your qc-content (the part about your skinfamilies) - since the folder is already stated above:

$texturegroup skinfamilies
{
{ "soldier_viking.vmt" }
{ "soldier_viking_blue.vmt" }
}

maybe that link helps ?
http://developer.valvesoftware.com/wiki/Multiple_Skins_for_a_Single_Model

honeymustard
05-29-2010, 02:48 PM
The model isn't duplicated - that had me worried though, lol.
When I load the model in the model viewer, it crashes, saying there was an error loading the model.
Will try changing the vmt's.

Acumen
05-29-2010, 03:50 PM
also don't forget to post the entire qc in here, not just the texture part.
could be within the qc file or some model export/import problem still :)

honeymustard
05-29-2010, 03:53 PM
Ok, I tried with the soldier skins, and it shows up one skin in game, without the blending. But when I switch teams, it doesn't switch skins. And when I load it in the model viewer, it comes up blank (but doesn't crash). Weird.

edit: here's the QC:

$cd "C:\Users\Mark\Documents\Hat\"
$modelname "player\items\scout\scout_domination.mdl"
$model "Body" "catchers_helmet.smd"
$cdmaterials "\models\player\items\scout\"
$cdmaterials ""
$texturegroup skinfamilies
{
{ "catchers_helmet.vmt" }
{ "catchers_helmet_blue.vmt" }
}
$hboxset "default"
$hbox 0 "bip_head" -4.316 -8.881 -8.195 4.525 0.000 4.860
// Model uses material "models/player/items/scout/catchers_helmet.vmt"
// Model uses material "catchers_helmet_blue.vmt"
$surfaceprop "plastic"
$illumposition 0.728 0.353 77.731
$sequence idle "idle.smd" loop fps 30.00


also to be clear, I've always used catchers_helmet as the red skin, not catchers_helmet_red, so there's no mismatch.

edit: something I just thought of, does it matter if some UVs are overlapping or inverted? edit: nevermind, fixed those and it still doesn't work :(

Mick-a-nator
05-30-2010, 06:14 AM
ok, my mistake. Sorry if I caused any confusion.

honeymustard
05-30-2010, 06:38 AM
I've managed to narrow it down to a problem with the vtf files. The vmts are fine, as they're identical to the batter/bonk helms. When I preview the vtfs in Hammer, the bottom sections are blue and blocky, so they must be corrupt somehow. I think the problem lies in vtfedit, though I haven't changed anything in the way that I import tga files and save them as vtf.

edit: I decided the cheat and use the bonk helm materials (as they are pretty much the same anyway). Now it works fine. Bleh. I blame vtfedit. Wish the Photoshop plugin would work in 64bit.