Transperant Overlay problem

PC's_Frank

L4: Comfortable Member
Aug 29, 2012
178
24
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.
ideal.jpg

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.
invtfedit.png

This is what it looked like in VTFedit. Since transparent backgrounds usually appear as black here, I didn’t really mind.
rfescreenshot.jpg

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.
 

seth

aa
May 31, 2013
1,019
851
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.
 

PC's_Frank

L4: Comfortable Member
Aug 29, 2012
178
24
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.

But I did put an alpha channel in there, and it didn't work.
 

Tumby

aa
May 12, 2013
1,084
1,192
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.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
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.