1. Post #1
    turk645's Avatar
    April 2007
    125 Posts

    Credit to Uglehs for the vid and the awesome color spreadsheet

    This tutorial will explain how to easy paint a hat from within SFM and allow for multiple hats of a differetn color to exist at one time.

    What you need:
    1. My cheap proxy import file
    2. Basic SFM know how
    3. Notepad ++ (or any other program you have that can open text


    ok, lets get started.

    1. First lets spawn a hat, we will use the pugilist_protector.mdl in this example.

    2. Right click on the animation set of the hat and select "Show in Element Viewer -> Model"

    3. At the top right click the green name "*_Gamemodel" (* being the name of the hat) and go to the Add Atribute option.

    4. Select "Element Array" and give it the name "materials" when prompted

    5. Right click the newly created option and select Import Element

    6. Browse to the file I have uploaded and select it.

    7. If it imported correctly you should see things like the cloak factor and what not. What we need to do now is properly link the material back to the model.

    8. Go back to the animation set and right click the hat. Select the option "Show Game Model in Explorer"

    9. Open the model with Notepad ++ or any other program you choose and go to the very end of the file. In the case of the pugilist_protector you should see something like "sparring.... sparring_blue....\models\player\items\heavy\"
    It will be differnet for each model but for the most part it will give you the path and then give you the different materials to the model. In this case if we wanted the change the color of the default red skin of the hat the path would be "models\player\items\heavy\sparring"

    10. Now that we have our texture path we want to go back into the element viewer and paste our material path where it says "Place Material Here"

    11. If everything has worked correctly you should then see the hat turn black instantly. This is a good thing and means that color changing is now ready.

    12. In the field that says $colortint_base you will see 3 zeros. This is the color you want in R G B format with numbers from 0-1. So red would be "1 0 0" and flat grey would be "0.5 0.5 0.5"



    Experiment with the colors and have fun with it. As i keep poking around the element viewer and learning more things i will try to get more tutorials out.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Useful Useful x 9Informative Informative x 2Friendly Friendly x 1 (list)

  2. Post #2
    THE GRINCH WHO STOLE COSMETICS
    Dennab
    August 2011
    5,740 Posts
    Silly question: how will we go about getting the exact values of paints? Do we just use the value of the color over 256 as a decimal?

    What I mean is that #2F4F4F (A Color Similar to Slate) would be 47, 79, 79 in RGB. In this case, would we use 0.184313725, 0.309803922, 0.309803922?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 1 (list)

  3. Post #3
    turk645's Avatar
    April 2007
    125 Posts
    yes. the X/255 method would give you the proper float for the color you need
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Useful Useful x 1 (list)

  4. Post #4
    shokwaav's Avatar
    May 2012
    62 Posts
    Can someone record a video tutorial of this? It didn't seem to work for me.

  5. Post #5
    shokwaav's Avatar
    May 2012
    62 Posts
    This doesn't seem to work with all hats.

  6. Post #6
    turk645's Avatar
    April 2007
    125 Posts
    This doesn't seem to work with all hats.
    would make sense since some hats are unpaintable in normal tf2 as well. In theory if you are good at photoshop and edit the files right you could make it colorable. If i'm right and it's possable then it should also be possable to do the same thing to the characters and havea color changing shirt, to an extent. I should toy with this today and see if i can make it work.


    Edit: Yup, some photoshop and a little edit to the vmf file and anything can have the color change value. I toyed with changing the pyro's suit and it worked fine although i suck at photoshop so i have some other parts of the model changing color as well due to a cheap mask i setup :P

  7. Post #7
    shokwaav's Avatar
    May 2012
    62 Posts
    would make sense since some hats are unpaintable in normal tf2 as well. In theory if you are good at photoshop and edit the files right you could make it colorable. If i'm right and it's possable then it should also be possable to do the same thing to the characters and havea color changing shirt, to an extent. I should toy with this today and see if i can make it work.


    Edit: Yup, some photoshop and a little edit to the vmf file and anything can have the color change value. I toyed with changing the pyro's suit and it worked fine although i suck at photoshop so i have some other parts of the model changing color as well due to a cheap mask i setup :P
    Well it didn't work with the swagman's swatter, but that's definitely paintable. Am I doing something wrong? It worked with other hats like the Max Head.

  8. Post #8
    turk645's Avatar
    April 2007
    125 Posts
    I was able to paint it just fine. Are you sure you are on the right skin?

    models/player/items/sniper/fwk_sniper_corkhat is the material path for the default red skin

  9. Post #9
    shokwaav's Avatar
    May 2012
    62 Posts
    I was able to paint it just fine. Are you sure you are on the right skin?

    models/player/items/sniper/fwk_sniper_corkhat is the material path for the default red skin
    Oh wow, that actually worked! I wish there was an easier way of finding the material path.

  10. Post #10
    AttemptedPants's Avatar
    May 2010
    851 Posts
    When I open the .mdl file in Notepad++ it shows this. Is that normal?

  11. Post #11
    support my deus ex fanfiction
    Gamerman12's Avatar
    November 2009
    1,463 Posts
    When I open the .mdl file in Notepad++ it shows this. Is that normal?
    Completely.

  12. Post #12

    May 2012
    3 Posts
    Its really handy to paint hats in SFM but it doesnt wana work on this one :(

    Its meant to be Mann co. Orange

  13. Post #13
    turk645's Avatar
    April 2007
    125 Posts
    thats because the vector 3 doesnt go by hex, it's a float. That means all colors are 0 to 1 so you would have to take each number and divide it by 255 to get the proper color.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 1 (list)

  14. Post #14

    May 2012
    3 Posts
    Ok thanks!

  15. Post #15

    August 2012
    2 Posts
    I have a question, I've used this and i've managed to change the colour of the Teufort tooth kickers and the Brown Bomber hat, but, I can't seem to change the colour of the scouts Fast Learner?.. and i have no idea why?, any ideas on why not?

  16. Post #16
    turk645's Avatar
    April 2007
    125 Posts
    what was the material path you used? i used models/player/items/scout/scout_prep_shirt and it painted just fine. It was also set to skin 0

  17. Post #17

    August 2012
    2 Posts
    I used that path, but it wasn't working for me, i'll try it again and see if it decides to work or not :/.. maybe it was just being glitchy for me lol

    EDIT:

    right.. its working now... maybe it was just the file i was using?... thanks anyway ^^;....

  18. Post #18
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    These are all the current TF2 Paint Can colors in RGB/255 format
    https://docs.google.com/spreadsheet/...1FqYWxjSWk1NFE
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Useful Useful x 1 (list)

  19. Post #19
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    video format. even though Lin already did one I believe.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Useful Useful x 1 (list)

  20. Post #20
    turk645's Avatar
    April 2007
    125 Posts
    Very nice vid tutorial. I am the creator of the cheap proxy file if you want to add that to an annotation, it's not a big deal though since it's more about people learning it than it is the recognition.

    Would you mind if I replace my cheap vid up top with this one for any new comers to the thread?

  21. Post #21
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    Very nice vid tutorial. I am the creator of the cheap proxy file if you want to add that to an annotation, it's not a big deal though since it's more about people learning it than it is the recognition.

    Would you mind if I replace my cheap vid up top with this one for any new comers to the thread?
    I dont have a problem. and ill add an annotation. Do you want me to link it to anywhere like a video or youtube channel?

  22. Post #22
    turk645's Avatar
    April 2007
    125 Posts
    You could always link to facepunch in general. We could always use new faces for the SFM board.

  23. Post #23
    here garry have a toonie
    Rebbacus's Avatar
    August 2009
    141 Posts
    I'm still wondering how you got the cycling colours on the heavy helmet video?

  24. Post #24
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    I'm still wondering how you got the cycling colours on the heavy helmet video?
    Like any other element you can animate them i believe... if not he just used video effects with fading.

    Edited:

    You could always link to facepunch in general. We could always use new faces for the SFM board.
    Annotations do not link outside of youtube.

  25. Post #25
    turk645's Avatar
    April 2007
    125 Posts
    Like any other element you can animate them i believe... if not he just used video effects with fading.

    Edited:

    I am also certain that there is a way to scale things and just hasnt been found yet.


    Annotations do not link outside of youtube.
    It was done from within SFM. It was also done in a very sloppy manner that i cant garentee the stability of. Long story short, i used the paste as reference option to turn an unrendered prop's xyz cords into the color values. Im sure there is a more proper way to do it but im still poking around the element viewer.


    Then you dont need to link it anywhere then :P


    Edit: I planned on explaining what i did a little better after i finish this really cheap n short vid I'm doing

  26. Post #26
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    can you also put the spreadsheet in the main thread as a refrence. I don't want my time of making it go to waste.

  27. Post #27
    turk645's Avatar
    April 2007
    125 Posts
    can you also put the spreadsheet in the main thread as a refrence. I don't want my time of making it go to waste.
    I knew i forgot to do something

  28. Post #28

    November 2012
    1 Posts
    Hello.I'm a steam user in Korea. I saw your tutorial.
    It was great! But..I followed your tutorial,but it doesn't work..
    ah..It gives me a lot of stress..I don't know what is the matter..
    Please,help me..

  29. Post #29
    I will take every opportunity to remind you that I'm not gay
    Dennab
    January 2010
    6,098 Posts
    Hmm, I can't seem to paint objects from L4D2. Could it also work like that?

  30. Post #30
    Gold Member
    Uglehs's Avatar
    July 2010
    1,035 Posts
    Hmm, I can't seem to paint objects from L4D2. Could it also work like that?
    Only some TF2 items have color ability, so I dont think the material name works with L4D2 items.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Artistic Artistic x 1 (list)

  31. Post #31

    January 2013
    1 Posts
    It works with most hats, but whenever i try to color all class hats like the Max head or Bills hat, it doesn't work, why?
    Reply With Quote Edit / Delete Reply Windows 7 Denmark Show Events Informative Informative x 1 (list)

  32. Post #32
    Taaro's Avatar
    November 2009
    95 Posts
    Would it be possible to get an update on the hat proxy? So many of the hats are un-paintable and it really gets on my nerves.
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Disagree Disagree x 1Agree Agree x 1 (list)

  33. Post #33
    Doc ock rokc's Avatar
    December 2009
    292 Posts
    Hmm, I can't seem to paint objects from L4D2. Could it also work like that?
    color2 works with l4d2 but in turn it colors the entire model.

  34. Post #34

    July 2013
    1 Posts
    I have a little problem:
    I want to make my new profile picture with my scout, but it seems like the Fast Learner does'nt work! All other of my hats do, but not Fast Learner. When i am painting it Australium Gold, is it really bright color! Please help me it would mean much to me!

    Edited:

    what was the material path you used? i used models/player/items/scout/scout_prep_shirt and it painted just fine. It was also set to skin 0
    Hello! I have also problems with Fast Learner, and yes, i am also using models/player/items/scout/scout_prep_shirt, but it seems to be grey instead of black. Then when i am painting it aus. gold, is it really light! Skin is set to 0, i've also tried 1, but it doesnt work. I hope you can help me!

  35. Post #35
    Doc ock rokc's Avatar
    December 2009
    292 Posts
    I have a little problem:
    I want to make my new profile picture with my scout, but it seems like the Fast Learner does'nt work! All other of my hats do, but not Fast Learner. When i am painting it Australium Gold, is it really bright color! Please help me it would mean much to me!

    Edited:



    Hello! I have also problems with Fast Learner, and yes, i am also using models/player/items/scout/scout_prep_shirt, but it seems to be grey instead of black. Then when i am painting it aus. gold, is it really light! Skin is set to 0, i've also tried 1, but it doesnt work. I hope you can help me!
    Try using this script
    Reply With Quote Edit / Delete Reply Windows 7 Show Events Agree Agree x 1 (list)

  36. Post #36

    August 2013
    1 Posts
    How do you open Notepad++ inside SFM?

  37. Post #37
    Freshz24's Avatar
    January 2012
    152 Posts
    How do you open Notepad++ inside SFM?
    wat

    notepad++ is a standalone piece of software developed by some smart kid in his free time.

  38. Post #38
    Ethos's Avatar
    October 2013
    2 Posts
    Hey guys I'm having trouble painting the Killers Kabuto any help would be greatly appreciated

    Here is a Screen Shot of My SFM



    I don't know what I'm looking for in notepad++ so I probably got the mtlName name wrong if anyone could show me what I'm supposed to be looking for that would be great

    Thanks in advance :]

  39. Post #39
    Doc ock rokc's Avatar
    December 2009
    292 Posts
    You could always use the SFM color scrpts. They find these paths for you and provide a gui so you can chose what paint you want.

  40. Post #40
    Ethos's Avatar
    October 2013
    2 Posts
    Where can i find these scripts ?