Generating coloured strategic icons from atlas + colour

Discussion in 'Mod Discussions' started by trialq, June 17, 2014.

  1. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Is it possible to generate the exact representation of the strategic icons shown in game, from the atlas files and team colour? In other words I want to do this:

    strat1.png + strat2.png = strat3.png
    , but outside of the game. Any information on how strategic icons work would be good, like:
    • Is there a way to make a particular pixel ignore team colour/highlighting rules? Say if I wanted it to be a particular colour no matter what
    • Are the exact colours from the lobby the ones used to generate the icons?
    • How is the colour applied to the atlas file? Is it something like red denotes a 'highlight mask', red and green denotes a 'team colour mask', lack of blue indicates where the icon pixels are? Fully transparent pixels are the only ones with any blue (in fact they're all 0x00FFFFFF ARGB), but this may not be necessary
    • Anything else that might help do the above
    I found a reference for strategic icons here: https://forums.uberent.com/threads/reference-strategic-icons-build-pictures.48631/
    Is there anything else to know?
    Last edited: June 17, 2014
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I thought I saw a script fro Cola_Colin that made a sprinted image of the icons, but I'm not going to search for it now.

    In general, you'd have to reproduce what particle_icon.fs shader does. It does seem to have an escape from the team color by the 'w' value, whatever that is.
    trialq likes this.
  3. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Is this what you're thinking of? It's taking the build bar icons and making them into a sprite sheet.

    Thank you for pointing me towards the shader, gives me something to stare at. Looks simple though, the floats could make it a little messy.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I thought it was strategic icons for use on pastats globe

Share This Page