Transparent vtf?

Avatar
yohoat9
274 Posts
Posted Jun 03, 2011
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.

Attachments
overlay_escher_logo.vmt
0.00 MB 46 downloads
overlay_escher_logo.vtf
0.17 MB 82 downloads
Advertisement
Registered users don’t see ads! Register now!
Avatar
WinstonSmith
940 Posts
Posted Jun 03, 2011
Replied 5 hours later
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):

img

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?

Avatar
yohoat9
274 Posts
Posted Jun 04, 2011
Replied 8 minutes later

WinstonSmith 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.

Avatar
WinstonSmith
940 Posts
Posted Jun 04, 2011
Replied 26 minutes later

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]
Avatar
yohoat9
274 Posts
Posted Jun 04, 2011
Replied 26 minutes later
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.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Aldéz
221 Posts
Posted Jun 04, 2011
Replied 7 hours later
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. :kermit:

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.