Transparent vtf?
Quote from yohoat9 on June 3, 2011, 6:56 pmI have a logo created for a possible mod/mappack I'm working on, and it looks fine, but I want the white background to be transparent, and can't seem to find working instructions anywhere. Can anybody help me?
I've attached the vtf and vmt.
I have a logo created for a possible mod/mappack I'm working on, and it looks fine, but I want the white background to be transparent, and can't seem to find working instructions anywhere. Can anybody help me?
I've attached the vtf and vmt.
Quote from WinstonSmith on June 3, 2011, 11:57 pmWhen I open the VTF in VTFEdit, I see the logo with a white background. However, when I open it in Paint.NET, I see part of the logo transparent and part opaque. In fact, the part that's opaque corresponds to the Aperture logo. Here, it's easier to just show you (the checkered bits are transparent):
For the record, making a transparent logo isn't that hard; take the logo you've created (open it up in VTFEdit and copy what's there into whatever image editing program you use), and make the white part transparent. You've already added $translucent 1 to the VMT so that's set.
Are you just looking for someone to make the logo transparent for you?
When I open the VTF in VTFEdit, I see the logo with a white background. However, when I open it in Paint.NET, I see part of the logo transparent and part opaque. In fact, the part that's opaque corresponds to the Aperture logo. Here, it's easier to just show you (the checkered bits are transparent):
For the record, making a transparent logo isn't that hard; take the logo you've created (open it up in VTFEdit and copy what's there into whatever image editing program you use), and make the white part transparent. You've already added $translucent 1 to the VMT so that's set.
Are you just looking for someone to make the logo transparent for you?
Quote from yohoat9 on June 4, 2011, 12:05 amWinstonSmith wrote:Are you just looking for someone to make the logo transparent for you?No, I was just confused as to why it wasn't showing up transparent, and also how come it has some outline of the aperture logo? That IS the vtf I edited, but I tried the transparency thing in photoshop, but when I put it into vtfedit and then hammer, it still wasn't transparent.
Just wait until I update this post to reply, I'm going to try a gif again.
[EDIT]
I tried using a transparent gif again, still wont work.
No, I was just confused as to why it wasn't showing up transparent, and also how come it has some outline of the aperture logo? That IS the vtf I edited, but I tried the transparency thing in photoshop, but when I put it into vtfedit and then hammer, it still wasn't transparent.
Just wait until I update this post to reply, I'm going to try a gif again.
[EDIT]
I tried using a transparent gif again, still wont work.
Quote from WinstonSmith on June 4, 2011, 12:32 amFirst of all, never use GIFs for anything involving Source. If you want transparency use TGAs. Second, I don't know why it's screwing with the alpha layer, but follow these steps.
1. Open the image you have (the VTF) in VTFEdit.
2. Right click on the image and copy it.
3. Open up Photoshop, edit it so the background is transparent, and save it as a TGA.
4. Open the TGA in VTFEdit and make it into a VTF. IMPORTANT: Use the BGRA8888 format, as this will allow transparency to...you know...work.
[Insert question mark/profit joke here]
First of all, never use GIFs for anything involving Source. If you want transparency use TGAs. Second, I don't know why it's screwing with the alpha layer, but follow these steps.
1. Open the image you have (the VTF) in VTFEdit.
2. Right click on the image and copy it.
3. Open up Photoshop, edit it so the background is transparent, and save it as a TGA.
4. Open the TGA in VTFEdit and make it into a VTF. IMPORTANT: Use the BGRA8888 format, as this will allow transparency to...you know...work.
[Insert question mark/profit joke here]
Quote from yohoat9 on June 4, 2011, 12:59 amOkay, I've done everything you told me to do, but it still doesn't work, there's still a white background on it, I used the tga and did BGRA8888 and everything.
Okay, I've done everything you told me to do, but it still doesn't work, there's still a white background on it, I used the tga and did BGRA8888 and everything.
Quote from Aldéz on June 4, 2011, 8:07 amThere's nothing wrong with the texture. I recommend that you keep the DXT5 compression instead of BGRA8888.
The problem is that you try to use "$selfillum" and "$translucent" at the same time in the material. Read more here. You need a separate mask texture for the illumination when you want the material to be transparent.
By the way, I'm curious why you have the Aperture logo in the alpha channel.
EDIT:
If you intended the whole texture to be evenly and fully illuminated, use the "unlitgeneric" shader instead and don't bother with the illumination mask.
There's nothing wrong with the texture. I recommend that you keep the DXT5 compression instead of BGRA8888.
The problem is that you try to use "$selfillum" and "$translucent" at the same time in the material. Read more here. You need a separate mask texture for the illumination when you want the material to be transparent.
By the way, I'm curious why you have the Aperture logo in the alpha channel.
EDIT:
If you intended the whole texture to be evenly and fully illuminated, use the "unlitgeneric" shader instead and don't bother with the illumination mask.