Team specific hat skins?

Discussion in 'Mapping Questions & Discussion' started by honeymustard, May 29, 2010.

  1. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    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:

    [​IMG]

    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?
     
    Last edited: May 29, 2010
  2. YM

    aa YM LVL100 YM

    Messages:
    6,357
    Thanks Received:
    4,739
    $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
     
  3. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    $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.
     
    Last edited: May 29, 2010
  4. YM

    aa YM LVL100 YM

    Messages:
    6,357
    Thanks Received:
    4,739
    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.
     
  5. Mick-a-nator

    aa Mick-a-nator

    Messages:
    618
    Thanks Received:
    309
    Have you made sure that both textures are assigned to the model in your modelling program before exporting?
     
  6. Nutomic

    Nutomic L11: Posh Member

    Messages:
    861
    Thanks Received:
    177
    Yeah it resizes them, which means everyone still has to download the whole image, it is just displayed smaller.
     
  7. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    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.

    [​IMG]

    There's one more picture, showing the blend a bit clearer.
     
    Last edited: May 29, 2010
  8. Mick-a-nator

    aa Mick-a-nator

    Messages:
    618
    Thanks Received:
    309
    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.
     
    Last edited: May 29, 2010
  9. YM

    aa YM LVL100 YM

    Messages:
    6,357
    Thanks Received:
    4,739
    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.

    =/
     
  10. Acumen

    aa Acumen Annoyer

    Messages:
    669
    Thanks Received:
    591
    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:

    maybe that link helps ?
    http://developer.valvesoftware.com/wiki/Multiple_Skins_for_a_Single_Model
     
    Last edited: May 29, 2010
  11. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    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.
     
  12. Acumen

    aa Acumen Annoyer

    Messages:
    669
    Thanks Received:
    591
    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 :)
     
  13. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    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 :(
     
    Last edited: May 29, 2010
  14. Mick-a-nator

    aa Mick-a-nator

    Messages:
    618
    Thanks Received:
    309
    ok, my mistake. Sorry if I caused any confusion.
     
  15. honeymustard

    honeymustard L9: Fashionable Member

    Messages:
    666
    Thanks Received:
    272
    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.
     
    Last edited: May 30, 2010