[REL] Supreme Commander icons (FAF)

Discussion in 'Released Mods' started by tatsujb, June 22, 2013.

  1. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    so I updated my icons for build 61250 earlier today;

    many new icons this time around :
    the land mine, the boom the inferno, the vanguard, the adv and basic field Engie, the transport, the flak, the achor, the deepspace radar, the teleportation gate, the orbital engie.

    As well as a touch up to many of my existing icons, including the mass point.

    Whoever finds the solution to the icon border glitch gets a hot fudge sundae paid in full grace by me, plus eternal devotion.
    Last edited: February 20, 2014
  2. moldez

    moldez Active Member

    Messages:
    177
    Likes Received:
    110
    hi

    nice to see an update for your mod ..

    as for :
    I have the excat same problem ..(especially t1 power and the new tanks?!) after I made a clean install of the gamefiles yesterday and adding my iconsmod the flickering borders were still there .. but with the original icons the error was gone ..

    .. in a moment of sanity I just copy pasted my iconpixels from one of my icons.png's into the corresponding new original *.png (instead of overwriting) .. rejoined my still running game and the error was gone !! wooha ..

    cheers moldez

    ps: maybe I could use some advise from you too *g* .. but first you should try this "workaround"
    tatsujb likes this.
  3. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    it isn't for any particular unit, it's random. It's been there since the very beginning of PA.

    The icons have always been a non-moddable folder and very VERY low pass.

    What i mean by this is that out of laziness the icons were never redrawn but are instead somewhere in the code resized 2 pixels less tall and wide.

    this obliges me to scale them up the inverse same amount before saving the PNGs to obtain the same size icons as in SupCom.

    I think the rescaling causes problems because of the amount of transparent pixels in each icon. the PNGs are 32 by 32 but i use 15 x 15 on average.
    I'll need a step by step here because this is unclear to me.
    Last edited: February 20, 2014
  4. moldez

    moldez Active Member

    Messages:
    177
    Likes Received:
    110
    I will PM you as soon as I get home from work ..

    in very short .. I opened my modded PNG .. lets say t1 Powergen - copied all coloured pixels ...

    opend up the "new" original Powergen PNG .. erased the colours from the original ...

    and pasted the modded icon into the now "empty" original PNG, rescaled it and rejoined my game .. the flickering and/or grey borders were gone

    (sounds like a weird way but thats how it worked for me !?)
    .. sry for my english
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    This sounds like the issue is the internal format of the png. There are many ways of encoding the colours inside the PNG. The way you do it now seems to preserve the internal format of the png. It might depend on the program you use, but I expect most image editors will preserve the format. This is all just guessing of course.

    For reference, the PNGs from PA itself are:
    icon_si_orbital_laser.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced
    tatsujb and Raevn like this.
  6. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    thanks, gonna see if my encoding was wrong.

    works in 611450 btw!

    EDIT: that's not it, that's exactly what I saved each and every one of them to.
    Last edited: February 21, 2014
  7. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    for the hell of it I went and reencoded all of them. all to no avail.
  8. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Well that's too bad. It was just a hunch.
  9. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    I wanna thank you in anycase, I appreciate you trying to find a solution, I've been banging my head against since the very beginning.


    let me know of any behavioral differences from your PC to mine.

    anything can go wrong with the differences from on PC to another.
  10. moldez

    moldez Active Member

    Messages:
    177
    Likes Received:
    110
    hi ..

    got the time to try and after todays update the flickerin dots in the corners were back again ..

    but however I was able to get rid of the grey icon borders again by the way I described above :-/

    .. and those fu**** flicker does not show up randomly .. at least for me its always the same icons ..

    so remember you are not alone with this s*** .. this is driving me crazy too

    keep it up man
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    all of these icons were originally drawn by this method. Do you mean I should start from the original icons and paste in my edited ones , in photoshop? what do you mean by the resize? you made them bigger then what i have?

    on an unrelated note is it ok if I hollow out the black part of the mass storage icon?

    the black tends to go toward grey in greater amounts because of shading. this would make the icon interior of a darker black.
    Last edited: February 21, 2014
  12. gillza

    gillza Member

    Messages:
    42
    Likes Received:
    18
    Will try today :)
  13. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Guys it seems ATI and intelHD are incompatible with my mod.

    I need a counter example of either Nvidia not working or intelHD/ATI working to debunk this hypothesis.

    not working means icons show up as pixelated rainbow version of the icon's shape flashing bright colours or not showing up at all.
    Last edited: February 26, 2014
  14. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Since the very first version of my mod the mass storage icon has been showing up grey instead of black.

    Would you believe it : as it turns out after all this time the incredible mystery behind this fearsome and relentless bug, once unveiled revealed that it was because..... *drumroll* ...it was grey.

    Enjoy! new fixed mass storage icon for both naval and land!
    icon_si_metal_storage-.png icon_si_metal_storage.png
    trialq and DeathByDenim like this.
  15. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    working on it now

    no promises.
  16. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    updated to v7 in pamm
  17. nuketf

    nuketf Active Member

    Messages:
    702
    Likes Received:
    130

    i well..fixed them :p as you can see in the supcom icons fixed :p but i have to wait to edit the icons for new units untill they stop uesing the radar blip icon >_>
  18. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Well it seems we can rub each other's backs then, use my icon_atlas.js and you'll be able to have 100% of the icons.

    it will unlock :
    -the land mine
    -the boom
    -the inferno
    -the vanguard
    -the adv field Engie
    -the transport
    -the flak

    Edit : yeah.... you just use Uber's shader, that doesn't work for me. (you made them full white so even the tech bars show up the team color and the nuke logo is team color + black : / )
    Last edited: February 26, 2014
  19. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    GAMMA: functional but WIP
  20. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Updated, but still unsatisfied with the shader, pretty desperate by now. Can't figure it out :
    Code:
    #version 150
    #ifdef GL_ES
    precision mediump float;
    #endif
    uniform sampler2D Texture;
    uniform vec4 TeamColor_Primary;
    uniform vec4 TeamColor_Secondary;
    in vec2 v_TexCoord;
    out vec4 out_FragColor;
    // lightness calculation
    float getLuma (in vec3 col)
      { return ( 0.3*col.r+0.59*col.g+0.11*col.b ); }
    // arguments: input colour, and blending colours (edges of RGB cube)
    // i.e. col000 corresponds to what the black pixels turn into,
    // col100 what the red pixels turn into, col101 the magenta pixels, etc...
    // this function turns the input colour into a blend of the given colours
    vec4 combo(in vec3 col,  in vec4 col000, in vec4 col111,
      in vec4 col100, in vec4 col010, in vec4 col001,
      in vec4 col110, in vec4 col101, in vec4 col011)
      {
      vec3 loc = vec3(1.0,1.0,1.0) - col;
      return ( col.x*col.y*col.z*col111 + col.x*col.y*loc.z*col110
      + col.x*loc.y*col.z*col101 + col.x*loc.y*loc.z*col100
      + loc.x*col.y*col.z*col011 + loc.x*col.y*loc.z*col010
      + loc.x*loc.y*col.z*col001 + loc.x*loc.y*loc.z*col000
      );
      }
    void main() {
      vec4 texel = texture(Texture, v_TexCoord);
      vec4 Black = vec4(0.0,0.0,0.0,1.0);
      vec4 White = vec4(1.0,1.0,1.0,1.0);
      float luma = getLuma(TeamColor_Primary.rgb);
      vec4 border;
      if (luma > 0.2)
      { border = Black; }
      else
      { border = White; }
      // temporary hack to allow icon highlight on selection
      // works because primary team colour is converted to cyan upon selection,
      // and because no actual team colour is pure cyan RGB(0,1,1)
      vec4 highlight;
      vec4 primary;
      if (TeamColor_Primary == vec4(0.0,1.0,1.0,1.0))
      { highlight = vec4(0.0,0.8,0.8,0.8);
      primary = vec4(0.0,0.0,0.0,0.0); }
      else
      { highlight = vec4(0.0,0.0,0.0,0.0);
      primary = TeamColor_Primary; }
     
      vec4 pip = vec4(1-border.x, 1-border.y, 1-border.z,border.a);
      vec4 shots = vec4(0.8,0.8,0,1);
      // NOTE: it seems that texel.r and texel.b are switched?!
      // this is why I'm using texel.bgr instead of texel.rgb
      vec4 final_color = combo(texel.bgr, border, pip, primary, TeamColor_Secondary, White, shots, White, highlight);
      out_FragColor = texel.a * final_color.a * final_color;
    }
     
    
    I want the whole border highlight story to go away, I want selected icons to do nothing in particular, and I want for green on my icons to not be secondary color but yellow at all times.

    (I'll figure out other case specific things after I get past that stage)

Share This Page