More Brush Colors for Hammer

Discussion in 'Tutorials & Resources' started by hutty, Nov 7, 2015.

  1. hutty

    aa hutty

    Messages:
    470
    Positive Ratings:
    371
    [​IMG]

    So, recently I started working in the 3D Flat camera mode in hammer, but I noticed that all of my brushes were coming out as blue, green or teal. (the outlines in 2D view also reflect these colors)

    After some experimentation, I found that when you make a brush hammer randomly picks a greenish/blueish color for your brush.
    [​IMG]
    (you can make a grid like this by copy pasting a little brush alot, making it a func_detail, and then pressing the to-world button)

    This color would persist if you copy/paste or dupe your brush.

    I found that hammer's color choices were too similar, limiting, and random.

    In the .vmf file, there is a line that defines the RGB color of a brush, this like can be edited to any color (as long as r,g, and b are > 0) The color will show up in hammer, save with the file, and carry over via cross file copy-pastes.
    Code:
    editor
    {
    "color" "251 198 217"
    "visgroupshown" "1"
    "visgroupautoshown" "1"
    }
    
    So, I made a small program (in processing) to cycle through the HSV rainbow and give a wide array of color choices.
    (code found here http://paste.ubuntu.com/13164646/, it doesn't make a complete .vmf, just the part relevant to shapes)

    You can download the .vmf file for yourself here
    http://tf2maps.net/resources/tool_colorarray.955/
     
    • Funny Funny x 2
    • Thanks Thanks x 1
  2. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    you should write a version that takes an existing map and assigns brush colours based on brush position
     
    • Agree Agree x 5
  3. hutty

    aa hutty

    Messages:
    470
    Positive Ratings:
    371
    coloring via height would actually be useful

    I might do that at some point (don't hold your breath for it though)
     
  4. Izotope

    aa Izotope Never releases maps

    Messages:
    606
    Positive Ratings:
    562
    I thought hammer does this because it reserves the other colors for brush entities, model-boundingboxes, etc.
     
  5. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    It generates colours within ranges, brush ents use one set of colours, groups use another, world brushes use another set of colours. So there is potential for clashing if you're using non-standard colours
     
  6. KubeKing

    Server Staff KubeKing Back home in Jupiter, things are getting harder

    Messages:
    1,223
    Positive Ratings:
    1,420
    Imagine doing that based off of Heatmaps.
     
    • Funny Funny x 1
  7. Hotel Detective

    Hotel Detective L4: Comfortable Member

    Messages:
    187
    Positive Ratings:
    189
    Oh man, if it could do it based off http://heatmaps.tf/
    that would be amazing.