Team Coloured Models.

Hey, you! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Blacktm points.
  • Post: Give Blacktm your thoughts on this Thread.
  • Flag: Alert moderators and warn members of a problem with this Thread.
  • Watch: Get notified when this Thread is updated.
Mascot

Join the community!

Become a Bananite

Already a Bananite? Login

Need some help.

Basically I need some one to explain how to work on ADDING colored variants to the TF2 weapons. I know this is possible as I've made a submission using Fade's edited/hacked Disguise kits. Which originally only use one Disguise kit texture. However this one uses two, so obviously THERE IS A WAY TO DO IT. Every other thread I've seen out there says "No it's impossible."

I've asked two of my friends that model, neither of them could get a method which works.
Renaming vmt and vtf files with the _red and _blu/_blue extensions doesn't work, as off the bat the model's coding in the qc file won't be looking for those file types.
I've decompiled and edited a qc file for example the Spy's revolver, to use red hands, blu hands, and v_revolver_red, v_revolver_blu but the closest I get when I recompile is a model, which can choose between Skin 1, and Skin 2 but it has the missing texture if I remove v_revolver, and always has Red sleeves.

The only thing I can think of, is opening the model in a modeling program itself and figuring out if you have to apply the texture in there. However I would be lost, as I don't actually remodel yet.

Next step is probably emailing some one from Valve, since if people really do know how to make team colored edits, they're doing a pretty good job keeping it secret.

Thanks to any one that helps. I'd probably do something for you when I buy ripe.

Comments

  • 90SK avatar
    90SK avatar Offline
    Member Joined 9 years ago
    3,139 points Ranked 1346th
    Report post
    8 years ago:
    I've done my own poking in regards to this issue, and I can't find anything. I though maybe hex editing the model would work... I actually haven't tried that yet, I kind of just assumed that it wouldn't work since I don't know how well the valve MDLs read in the hex editor I use. But if you have time to spare on it, maybe give it a look. Here's the link to the hex editor I use.

    Someone more savvy with TF2 models could probably clear this up. Valve can do it, I don't see why we couldn't as well given the right kind of knowledge.
    Human Male
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Thanks but your link 404's. I'll give this thread a few days then I'll try emailing the Valve guys themselves.
    Banned
  • Conro101 avatar
    Conro101 Offline
    Member Joined 8 years ago
    186 points Ranked 16485th
    Report post
    8 years ago:
    Yeah, 90sk, please update your link.
    Recipeient of the Best Robot E avatar
    Mantra
    Recipeient of the Best Robot E
  • qwdqwdfsfafgerwgetrfwe avatar
    Member Joined 11 years ago
    Report post
    8 years ago:
  • modderfreak avatar
    Member Joined 11 years ago
    Report post
    8 years ago:
    Posted by 90SK

    Someone more savvy with TF2 models could probably clear this up.

    Someone called?

    You need to use the $texturegroup modifier, explained here.

    TF2-specific, you need to pay attention to the names of the textures - the model should use the red texture as default and the blue one as option. An example:

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" }
    { "blade_blue.vmt" , "glow_blue.vmt" }
    }
    }

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" } - red textures
    { "blade_blue.vmt" , "glow_blue.vmt" } - blue textures
    }
    }


    You can also align the code different, like this:
    $texturegroup skinfamilies
    {
    {
    "blade.vmt"
    "glow.vmt"
    }
    {
    "blade_blue.vmt"
    "glow_blue.vmt"
    }
    }
    }
    Respect is everything. avatar
    Mantra
    Respect is everything.
  • qwdqwdfsfafgerwgetrfwe avatar
    Member Joined 11 years ago
    Report post
    8 years ago:
    Awesome, Thanks a lot ModderFreak!
    asdasdasd
  • 90SK avatar
    90SK avatar Offline
    Member Joined 9 years ago
    3,139 points Ranked 1346th
    Report post
    8 years ago:
    Posted by Conro101

    Yeah, 90sk, please update your link.


    odd, it worked when I tried it last. ah well.

    but yeah, thanks a bunch modderfreak! I'll definitely have to try that out.
    Human Male
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Cheers man now I can finally do all those skin ideas I've had.
    Banned
  • BooGiTyBoY avatar
    BooGiTyBoY Offline
    Member Joined 8 years ago
    1,949 points Ranked 2223rd
    Report post
    8 years ago:
    Posted by modderfreak

    Posted by 90SK

    Someone more savvy with TF2 models could probably clear this up.

    Someone called?

    You need to use the $texturegroup modifier, explained here.

    TF2-specific, you need to pay attention to the names of the textures - the model should use the red texture as default and the blue one as option. An example:

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" }
    { "blade_blue.vmt" , "glow_blue.vmt" }
    }
    }

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" } - red textures
    { "blade_blue.vmt" , "glow_blue.vmt" } - blue textures
    }
    }


    You can also align the code different, like this:
    $texturegroup skinfamilies
    {
    {
    "blade.vmt"
    "glow.vmt"
    }
    {
    "blade_blue.vmt"
    "glow_blue.vmt"
    }
    }
    }


    Okay can someone show me this in an actual weapons vmt file? I can skin, I cant code for beans, haha.
    Im trying to do a first-person flamethrower with a red/blue v_ texture. I try to enter those lines replacing the file names and it keeps giving me an error on line whatever when I try to save it... so of course I'm doing something wrong with the brackets or something.

    Can I get a little noob-friendly help here?
    ThE ImPaCT-DaMpeNeD BooGeRaToR avatar
    Mantra
    ThE ImPaCT-DaMpeNeD BooGeRaToR
  • RedRogueXIII avatar
    Member Joined 11 years ago
    4,316 points Ranked 993rd
    Report post
    8 years ago:
    Posted by BooGiTyBoY

    Okay can someone show me this in an actual weapons vmt file? I can skin, I cant code for beans, haha.
    Im trying to do a first-person flamethrower with a red/blue v_ texture. I try to enter those lines replacing the file names and it keeps giving me an error on line whatever when I try to save it... so of course I'm doing something wrong with the brackets or something.

    Can I get a little noob-friendly help here?


    Those commands are written in the .qc file of an uncompiled model, they won't work being put in a .vmt.
  • BooGiTyBoY avatar
    BooGiTyBoY Offline
    Member Joined 8 years ago
    1,949 points Ranked 2223rd
    Report post
    8 years ago:
    Okay so I guess im out of luck as I'm also clueless on model stuff :(

    Unless someone can point in the direction of where i can learn such things :)

    I know some good tutorial sites for modelling but I have no idea what part I'm looking for or what I'd need to know for this.
    ThE ImPaCT-DaMpeNeD BooGeRaToR avatar
    Mantra
    ThE ImPaCT-DaMpeNeD BooGeRaToR
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Posted by BooGiTyBoY

    Okay so I guess im out of luck as I'm also clueless on model stuff :(

    Unless someone can point in the direction of where i can learn such things :)

    I know some good tutorial sites for modelling but I have no idea what part I'm looking for or what I'd need to know for this.


    If I get the method right, I'll help if no one else has.
    Banned
  • BooGiTyBoY avatar
    BooGiTyBoY Offline
    Member Joined 8 years ago
    1,949 points Ranked 2223rd
    Report post
    8 years ago:
    That would be awesomeness Blacktm and would be greatly appreciated :)
    ThE ImPaCT-DaMpeNeD BooGeRaToR avatar
    Mantra
    ThE ImPaCT-DaMpeNeD BooGeRaToR
  • jjjrmy avatar
    jjjrmy Offline
    Member Joined 8 years ago
    223 points Ranked 14487th
    8 medals 1 rare
    • 6 years a member Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    Report post
    8 years ago:
    Yeah, I wanna learn about this too!
    /* No Comment */ avatar
    Mantra
    /* No Comment */
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Posted by modderfreak

    Posted by 90SK

    Someone more savvy with TF2 models could probably clear this up.

    Someone called?

    You need to use the $texturegroup modifier, explained here.

    TF2-specific, you need to pay attention to the names of the textures - the model should use the red texture as default and the blue one as option. An example:

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" }
    { "blade_blue.vmt" , "glow_blue.vmt" }
    }
    }

    $texturegroup skinfamilies
    {
    { "blade.vmt" , "glow.vmt" } - red textures
    { "blade_blue.vmt" , "glow_blue.vmt" } - blue textures
    }
    }


    You can also align the code different, like this:
    $texturegroup skinfamilies
    {
    {
    "blade.vmt"
    "glow.vmt"
    }
    {
    "blade_blue.vmt"
    "glow_blue.vmt"
    }
    }
    }


    Ok so far I've had some good moments, and some bad.

    I've decompiled a beta tranquilizer skin and managed to get team coloured versions of it working for the V_model. So in game the sleeves and the textures both work no problem.

    However in the modelviewer I can select between Skin 1 and Skin 2 for the w_ tranq model. But the skin is always the red version, even though I have edited the texture group and skin families to include a blu version.

    Lastly when trying to decompile, edit and add the TF2 bat I get a error from GUIStudioMDL 2.2 Source:

    Working on "mdldecompiler.qc"
    SMD MODEL D:\Documents and Settings\**Removed**\Desktop\O\Modeling\OUT\w_bat/w_bat_reference.dmx.smd
    ERROR: d:\documents and settings\**Removed**\desktop\desktop\o\modeling\out\w_bat\mdldecompiler.qc(6): - Unknown replace model 'w_bat_reference'
    ERROR: Aborted Processing on 'weapons\w_models\w_bat.mdl'

    (By the way I do have a folder called Desktop on my Desktop, so that isn't a location error on that part.)

    Again thanks for any help.
    Banned
  • BrainZ avatar
    BrainZ avatar Offline
    Member Joined 9 years ago
    22,548 points Ranked 192nd
    Report post
    8 years ago:
    It's possible if you recompile models if I'm not mistaken.
    gone
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Posted by BrainZ

    It's possible if you recompile models if I'm not mistaken.


    Not meaning to sound like jackass here, but can you please read the posts in future. It's been established that team colored skins work by recompiling.
    Banned
  • modderfreak avatar
    Member Joined 11 years ago
    Report post
    8 years ago:
    Posted by Blacktm

    Ok so far I've had some good moments, and some bad.

    I've decompiled a beta tranquilizer skin and managed to get team coloured versions of it working for the V_model. So in game the sleeves and the textures both work no problem.

    However in the modelviewer I can select between Skin 1 and Skin 2 for the w_ tranq model. But the skin is always the red version, even though I have edited the texture group and skin families to include a blu version.

    Lastly when trying to decompile, edit and add the TF2 bat I get a error from GUIStudioMDL 2.2 Source:

    Working on "mdldecompiler.qc"
    SMD MODEL D:\Documents and Settings\**Removed**\Desktop\O\Modeling\OUT\w_bat/w_bat_reference.dmx.smd
    ERROR: d:\documents and settings\**Removed**\desktop\desktop\o\modeling\out\w_bat\mdldecompiler.qc(6): - Unknown replace model 'w_bat_reference'
    ERROR: Aborted Processing on 'weapons\w_models\w_bat.mdl'

    (By the way I do have a folder called Desktop on my Desktop, so that isn't a location error on that part.)

    Again thanks for any help.

    If the texturegroup is working but not showing the right texture, you either named the texturegroup wrong (for example two times "v_texture_red.vmt"), or the .vmt the blue texture modifier is using is still pointing to your red texture.
    The compiling errors of the bat are caused by the lod models, either remove them from the .qc or fix'em. To be honest I don't know what's wrong there since I never recompiled default TF2 wees, but I guess that the decompiler messed up the .qc code.
    Respect is everything. avatar
    Mantra
    Respect is everything.
  • Blacktm avatar
    Blacktm avatar Offline
    Member Joined 9 years ago
    Report post
    8 years ago:
    Posted by modderfreak ...

    K I seem to be running into tonnes of problems now. I tried looking at the vmts they look fine, w_tranq_blu points to a _blu.vtf and QC has both normal and blu prefixes.

    Instead of keeping it to myself I'll just post it here, so I won't give up.

    $cd "D:\Documents and Settings\***Removed***\Desktop\Desktop\O\Modeling\OUT\w_revolver"
    $modelname "weapons/w_models/w_revolver.mdl"
    $model "Body" "w_grey.smd"
    $cdmaterials "\models\weapons\w_tranq\"
    $cdmaterials ""
    {
    {
    "models/weapons/v_tranq/w_tranq.vmt"
    }
    {
    "w_tranq_blu.vmt"
    }
    }
    }
    $hboxset "default"
    // Model uses material "w_tranq.vmt"
    // Model uses material "w_tranq_blu.vmt"
    $attachment "muzzle" "weapon_bone" 0.00 2.72 14.78 rotate -90.00 0.00 0.00
    $attachment "eject_brass" "weapon_bone" 0.00 1.92 1.59 rotate 90.00 0.00 0.00
    $surfaceprop "metal"
    $illumposition 0.000 5.389 -0.425
    $sequence idle "idle" loop fps 30.00
    $collisionmodel "phymodel.smd" {

    $mass 1.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
    }


    That gives me this error:
    WARNING: AppFramework : Unable to load module p4lib.dll!
    qdir: "d:\documents and settings\***Removed***\desktop\desktop\o\modeling\out\w_revolver\"
    gamedir: "d:\program files\steam\steamapps\***Removed***\team fortress 2\tf\"
    g_path: "D:\Documents and Settings\***Removed***\Desktop\Desktop\O\Modeling\OUT\w_revolver\mdldecompiler.qc"
    Building binary model files...
    Working on "mdldecompiler.qc"
    SMD MODEL D:\Documents and Settings\***Removed***\Desktop\Desktop\O\Modeling\OUT\w_revolver/w_grey.smd
    ERROR: d:\documents and settings\***Removed***\desktop\desktop\o\modeling\out\w_revolver\mdldecompiler.qc(6): - bad command {
    ERROR: Aborted Processing on 'weapons/w_models/w_revolver.mdl'


    Which is incredibly weird, as earlier the same method I used to create and edit the v_models was working slightly, with the only red texture problem. Which is why it seems to have gone backwards.

    The w_tranq_blu.vmt:
    "VertexLitGeneric"
    {
    "$basetexture" "models\weapons\v_tranq\w_tranq_blu"
    "$bumpmap" "models\weapons\v_tranq\w_tranq_NRM"
    "$selfillum" "1"
    "$nodecal" "1"

    "$phong" "1"
    "$phongexponent" "25"
    "$phongboost" "10"
    "$phongexponenttexture" "models\weapons\v_tranq\w_tranq_SPEC"
    "$lightwarptexture" "models\lightwarps\weapon_lightwarp"
    "$phongfresnelranges" "[1.5 .5 3]"
    "$halflambert" "1"

    "$basemapalphaphongmask" "1"

    "$rimlight" "1"
    "$rimlightexponent" "20"
    "$rimlightboost" ".25"

    "360?$color2" "[ 0.5 0.5 0.5 ]"

    // Cloaking
    "$cloakPassEnabled" "1"
    "Proxies"
    {
    "vm_invis"
    {
    }

    "Sine"
    {
    "resultVar" $selfillumtint
    "sinemin" .15
    "sinemax" 4
    "sineperiod" 1
    }
    }


    I also get "Model has no Sequence" errors, any idea on how to fix that?

    Another modeler also suggested removing the lods from the bat Qc, I thought this would be bad practice though, or aren't they dire when releasing a skin/model?

    I've already posted the bat error, here's the bat qc:

    $cd "D:\Documents and Settings\***REMOVED***\Desktop\Desktop\O\Modeling\OUT\w_bat"
    $modelname "weapons\w_models\w_bat.mdl"
    $model "Body" "w_bat_reference.dmx.smd"
    $cdmaterials "\models\weapons\w_bat\"
    $cdmaterials ""
    $texturegroup skinfamilies
    {
    { "models/weapons/w_bat/w_bat.vmt" }
    { "w_bat_blu.vmt" }
    }
    $hboxset "default"
    // Model uses material "models/weapons/w_bat/w_bat.vmt"
    // Model uses material "models/weapons/w_bat/w_bat_blu.vmt"
    $surfaceprop "metal"
    $illumposition 0.084 0.017 12.152
    $sequence idle "idle" loop fps 30.00
    $collisionmodel "phymodel.smd" {

    $mass 1.4
    $inertia 1.00
    $damping 0.00
    $rotdamping 4.00
    }


    In summary:
    The tranq either says: { is not a command/Model has no sequences/Will not let me choose the blu version even though it has SKIN 1 and SKIN 2

    The bat has the problems with the lods, which I'll try removing.

    Yes I'm trying a little test on the Beta TF2 tranquilizer skin that has been made here:http://www.fpsbanana.com/skins/46535

    Don't worry I won't release if I get it working with out permission.

    Man I am tired it's like 3 am so this is bound to be seriously flawed in a ridiculously easy way.
    Banned
  • modderfreak avatar
    Member Joined 11 years ago
    Report post
    8 years ago:
    Posted by Blacktm

    $cd "D:\Documents and Settings\***Removed***\Desktop\Desktop\O\Modeling\OUT\w_revolver"
    $modelname "weapons/w_models/w_revolver.mdl"
    $model "Body" "w_grey.smd"
    $cdmaterials "\models\weapons\w_tranq\"
    $cdmaterials ""
    {
    {
    "models/weapons/v_tranq/w_tranq.vmt"
    }
    {
    "w_tranq_blu.vmt"
    }
    }
    }
    $hboxset "default"
    // Model uses material "w_tranq.vmt"
    // Model uses material "w_tranq_blu.vmt"
    $attachment "muzzle" "weapon_bone" 0.00 2.72 14.78 rotate -90.00 0.00 0.00
    $attachment "eject_brass" "weapon_bone" 0.00 1.92 1.59 rotate 90.00 0.00 0.00
    $surfaceprop "metal"
    $illumposition 0.000 5.389 -0.425
    $sequence idle "idle" loop fps 30.00
    $collisionmodel "phymodel.smd" {

    $mass 1.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
    }

    Of course this gives you an error, you forgot to put the texturegroup modifier ($texturegroup skinfamilies) before all the brackets. Also, you don't put the filepath into the modifier, it has to be controlled by the $cdmaterials modifier (you can add as many of this as you want).
    $cd "D:\Documents and Settings\***Removed***\Desktop\Desktop\O\Modeling\OUT\w_revolver"
    $modelname "weapons/w_models/w_revolver.mdl"
    $model "Body" "w_grey.smd"
    $cdmaterials "\models\weapons\w_tranq\"
    $cdmaterials ""
    $texturegroup skinfamilies
    {
    { "w_tranq.vmt" }
    { "w_tranq_blu.vmt" }
    }
    }
    $hboxset "default"
    // Model uses material "w_tranq.vmt"
    // Model uses material "w_tranq_blu.vmt"
    $attachment "muzzle" "weapon_bone" 0.00 2.72 14.78 rotate -90.00 0.00 0.00
    $attachment "eject_brass" "weapon_bone" 0.00 1.92 1.59 rotate 90.00 0.00 0.00
    $surfaceprop "metal"
    $illumposition 0.000 5.389 -0.425
    $sequence idle "idle" loop fps 30.00
    $collisionmodel "phymodel.smd" {

    $mass 1.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
    }


About the lods; you don't need them but they will make the game run faster when the model is on distance. If it is a default model and you already have the lods, I would suggest to keep them. If you can't compile because of them, throw them out.
Respect is everything. avatar
Mantra
Respect is everything.

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Submitter

Blacktm avatar
Blacktm avatar Offline
Member Joined 9 years ago

Blacktm avatar
Blacktm
Send a Private Message to the submitter

Stats

Posts
20
Views
7,756
Date Added
8 years ago
Oct 25 2008 @ 3:16pm UTC
Date Modified
8 years ago
Oct 25 2008 @ 6:04pm UTC

More Threads from Blacktm

WiPs by Blacktm