surface.GetTextureID, How do I make a working image with a transparent backround?

I made an image for my weapons hud 5 times in photoshop as a .png file interlaced. Made the vtf and vmt file and it shows up with a white backround. How do i make it transparent like all the other silk icons?

Make sure the background of the original .PNG image is black, which is interpreted as an alpha of 0. And, of course, your vmt is UnlitGeneric right?

Thanks ill try that right now! Yes it is UnlitGeneric. What about the settings for making the vmt? and vtf?

Make sure there is no LOD and no mipmaps.

I made the backround black(.png) and it still didn’t work.

What did it look like after you made it black?

Odd. Does it have an alpha layer in the vtf flags? Maybe that’s the problem.

Whats the name of that? SRGB?

Nah, it’s like 8-bit alpha.

That is defaultly checked.

That’s weird, usually works for me.

Want me to send you the picture and see if you can get it to work?

[editline]12th February 2012[/editline]

Got it working :slight_smile: thanks!

What was wrong with it? (For future reference)

I didnt restart garrysmod and forgot you have to when you add a new file (for some things)

Sorry for slight bump, but using ‘mat_reloadallmaterials’ does the job so you don’t have to restart GMod.

Thanks good tip :smiley: another one was +mat_ something I don’t remember but u’ll see when it pops up!