Alpha Channel on HUD weapons

Need help with your project? Ask here.
User avatar
Bishop
Posts: 22
Joined: Mon May 04, 2009 13:40
Location: France

Alpha Channel on HUD weapons

Post by Bishop »

I'm trying to make HUD weapons with an an alpha channel on the muzzle flash, but I don't know how to make this work.
Iv'e looked everywhere, I saw somescreenshots of people doing that, but nothing that explains how to.

Here's a screenshot of what the actual sprite looks like (left) and how it's rendered in the game:
Spoiler:
As you can see, it's as if gzdoom just ignored the transparent region.
So if someone could explain how this works, or if it's even possible, I'll be very gratefull.
Thanks in advance for any help.
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: Alpha Channel on HUD weapons

Post by Rachael »

From what I understand, it's not possible with GZDoom. However, if you're only doing the muzzle flash, what you can do is create a texture using additive transparency, and art it accordingly. Just make sure not to use black for transparency or you'll incur the wrath of the proprietary gods, and wonder where all the complaints are coming from when people complain it doesn't work with invulnerability. ;)
User avatar
Enjay
Developer
Developer
Posts: 4723
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alpha Channel on HUD weapons

Post by Enjay »

TEXTURES it is:

http://zdoom.org/wiki/TEXTURES

Rough and ready example just thrown together to show the basic principle.

Image
Attachments
sht.zip
(3.9 KiB) Downloaded 95 times
User avatar
Bishop
Posts: 22
Joined: Mon May 04, 2009 13:40
Location: France

Re: Alpha Channel on HUD weapons

Post by Bishop »

Ok, that's good enough for me.
Thank you very much :)
User avatar
Enjay
Developer
Developer
Posts: 4723
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Alpha Channel on HUD weapons

Post by Enjay »

Hmmm... actually, I'm not convinced that the TEXTURES lump has much to do with it. I've been messing with this a bit myself and I can't seem to get a smooth gradation. If I set something to be very translucent, GZdoom seems to not draw it. If I set it to about 50% or less translucency (ie, not very see-through), it gets drawn (and is translucent to about the amount in the original image). The conversion from a nice subtle gradation in the original images to what is seen on screen in GZdoom does not seem to be that subtle and it seems to be almost as crude as 100 opaque, about 50% translucent, 0% visible. I can't get anything that looks much more subtle than that. That effect works with, or without the TEXTURES lump. I have only tried this with PNG graphics. It may be different with another format.
Post Reply

Return to “Editing Help”