Transperant Overlay problem

Discussion in 'Mapping Questions & Discussion' started by PC's_Frank, Apr 9, 2015.

  1. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    I’m sorry about this. I know I’m constantly asking for help with something (and being slow to reply, due to a combination of work and the website slowing down my computer some strange reason)but I have tried for the last three days to find a solution to this problem and failed. It’s a problem involving either VTFedit, GIMP, or possibly both.
    [​IMG]
    What I’ve been trying to do is make an overlay with a transparent background. I started by making a circle in GIMP, and then turning that circle into a path. After that, wrote my text and used “text to path” to curve it. I “fuzzy selected” the lettering, moved it to the area I wanted it in, filled it in with a color from the TF2 palette, and deleted the original path to text. Afterwards, I found an image of a flame on the internet, pasted it beneath the text, and wrote my italicized text beneath it. Once that had been done, I exported it to VTFedit twice, once as a PNG the other as a TGA.
    [​IMG]
    This is what it looked like in VTFedit. Since transparent backgrounds usually appear as black here, I didn’t really mind.
    [​IMG]
    However, the finished spray in Hammer retains this black background rather than appear transparent. I’ve spent three days trying to fix it myself and looking for answers across the internet. So far, none of them have worked. The worst part is, I’ve successfully put overlays with transparent backgrounds into Hammer before, and they worked. Granted, these overlays did not feature text that had been put on “text to path.” In fact, now that I’m writing this, I’ve realized those ones never even had paths; that is the only difference I can think of. Basically, I have no idea what I am doing wrong.
     
  2. Izotope

    aa Izotope Never releases maps

    Messages:
    625
    Positive Ratings:
    597
    Just add
    "$translucent" 1
    to your VMT
     
    • Thanks Thanks x 1
  3. sevin

    aa sevin

    Messages:
    959
    Positive Ratings:
    663
    I doubt you spent much time looking this up. You just need to use your alpha channel in Gimp as a mask. Fill the areas you want to be shown in white and the transparent areas in black. Then just use $translucent 1 in your VMT and it'll work.
     
    • Thanks Thanks x 1
  4. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    But I did put an alpha channel in there, and it didn't work.
     
  5. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    It worked! Thank you so much!
     
  6. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    951
    Positive Ratings:
    937
    The alpha around anything should have the same color as the thing itself.
    In this case, the Alpha should be white. That is why Gimp is a bad idea for that kind of stuff.
    Also, as long as your alpha is pretty much just ON / OFF you can use $alphatest instead of $translucent. It's easier to render.

    Transparent things in VTFEdit can be shown by pressing CTRL + M.
     
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    I think what Tumbo is trying to say here is that instead of making the text and graphic transparent and then trying to convert that into a valid image, you should have just made them inside the alpha channel to begin with as white on a black background, and then gone back to the image itself and filled the whole thing in with the light gray color you grabbed from the palette. That gets you the cleanest results and isn't too hard to accomplish in GIMP. The drawback is that it'll just show up as a plain black square in the texture browser and might be hard to find.

    A purely binary alpha is a bad idea for signage with or without $alphatest.