Transparent PNGs, What The Fuck

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
CrystalWolf
Posts: 155
Joined: Tue May 05, 2009 9:24 pm
Location: New Orleans, LA
Contact:

Transparent PNGs, What The Fuck

Post by CrystalWolf »

Well, I'm stumped. I've tried every possible way to apply transparency to my sprites, and it seems like XWE, Windows, IrfanView, Paint... Actually, it seems like everything except GZDoom recognizes that these PNGs have a transparent color. I really have no idea what I'm doing wrong and I would appreciate it if anyone would be kind enough to tell me what it is I'm missing. In the mean time, you all can take a peek at the little fragments of conceptual work I've done on this mod (hint: check the Sounds/ directory...)

http://www.filesavr.com/inmemorium

While I'm at it, I'd like to ask if anyone would like to help specifically with either the artwork or with some logical stuff like managing the scripts within the PK3. By artwork, I mean taking screenshots and erasing out the background, leaving just the weapon frames, as I've attempted to do here myself. Mapper(s) welcome too.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Transparent PNGs, What The Fuck

Post by Project Shadowcat »

With PNGs, you must set actual transparency and not use the color of cyan. A program like Paint can't do that so you need to grab something that can. Say, Paint.NET.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: Transparent PNGs, What The frak

Post by Ceeb »

IrfanView is your friend if you need to do a whole ton of them at once. Just remember...

PNG > advanced > change color depth > 256 colors (8 BPP)

It doesn't hurt the colors at all, but for some reason, that's the only way it will work.
User avatar
CrystalWolf
Posts: 155
Joined: Tue May 05, 2009 9:24 pm
Location: New Orleans, LA
Contact:

Re: Transparent PNGs, What The frak

Post by CrystalWolf »

@ProjectDarkFox: I was setting transparency with IrfanView and simply using cyan as my transparent color, as it's what I'm used to.

What Ceeb suggested worked quite famously though. Thank you for the assistance.
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Transparent PNGs, What The frak

Post by Ichor »

Gimp works quite well. Open a .png file, add a transparency alpha, then delete everything in the picture that you want to be transparent.
User avatar
Zhs2
Posts: 1298
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: Transparent PNGs, What The Fuck

Post by Zhs2 »

Image Magic Wand tool.
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: Transparent PNGs, What The Fuck

Post by bagheadspidey »

What's going on here is PNG supports two different kinds of transparency. With the most common kind of transparency, each pixel (for true color PNGs) or palette entry (indexed PNGs) has its own transparency info. This allows some pixels to be more transparent than others. The less common kind is only used with indexed PNGs, and works more like GIF transparency: one palette entry is defined as being fully transparent, and even though it has color information too, clients are supposed to render all pixels using that palette index as transparent. I suspect that this is the method you were using initially. So technically this could be considered a bug / feature request, because those pixels are indeed supposed to be transparent, it just sounds like (g)zdoom doesn't honor that part of the PNG spec.

edit - my interpretation of the tRNS chunk was a little off, apparently it's much less limited that I thought... but I still think this is what caused the problem.
User avatar
DOOMERO-21
Posts: 1423
Joined: Wed Jan 02, 2008 10:02 pm
Location: Chile

Re: Transparent PNGs, What The frak

Post by DOOMERO-21 »

use "microsoft photo editor" is a nice program, can make transparent png so easily..., i really like more than photoshop.
Locked

Return to “Editing (Archive)”