surface.GetTextureID, How do I make a working image with a transparent backround?
16 replies, posted
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?
[QUOTE=wizardsbane;34660242]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?[/QUOTE]
Thanks ill try that right now! Yes it is UnlitGeneric. What about the settings for making the vmt? and vtf?
(Flags)
[QUOTE=brandonj4;34660267]Thanks ill try that right now! Yes it is UnlitGeneric. What about the settings for making the vmt? and vtf?
(Flags)[/QUOTE]
Make sure there is no LOD and no mipmaps.
I made the backround black(.png) and it still didn't work.
[QUOTE=brandonj4;34660324]I made the backround black(.png) and it still didn't work.[/QUOTE]
What did it look like after you made it black?
[QUOTE=wizardsbane;34660392]What did it look like after you made it black?[/QUOTE]
[URL="http://steamcommunity.com/id/Infernofication/screenshot/505764350197262677"]http://steamcommunity.com/id/Infernofication/screenshot/505764350197262677[/URL]
Odd. Does it have an alpha layer in the vtf flags? Maybe that's the problem.
[QUOTE=wizardsbane;34660433]Odd. Does it have an alpha layer in the vtf flags? Maybe that's the problem.[/QUOTE]
Whats the name of that? SRGB?
[QUOTE=brandonj4;34660451]Whats the name of that? SRGB?[/QUOTE]
Nah, it's like 8-bit alpha.
That is defaultly checked.
[QUOTE=brandonj4;34660471]That is defaultly checked.[/QUOTE]
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]
[QUOTE=brandonj4;34660494]Want me to send you the picture and see if you can get it to work?[/QUOTE]
Got it working :) thanks!
What was wrong with it? (For future reference)
[QUOTE=wizardsbane;34660531]What was wrong with it? (For future reference)[/QUOTE]
I didnt restart garrysmod and forgot you have to when you add a new file (for some things)
[QUOTE=brandonj4;34660569]I didnt restart garrysmod and forgot you have to when you add a new file (for some things)[/QUOTE]
Sorry for slight bump, but using 'mat_reloadallmaterials' does the job so you don't have to restart GMod.
[QUOTE=MattJeanes;34704127]Sorry for slight bump, but using 'mat_reloadallmaterials' does the job so you don't have to restart GMod.[/QUOTE]
Thanks good tip :D another one was +mat_ something I don't remember but u'll see when it pops up!
Sorry, you need to Log In to post a reply to this thread.