Transparent PNGs?

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.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Wow, I never knew cyan was so... blue...

:twisted:
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

ellmo wrote:Yeah, I always use default MS-fuckin'-Paint pink colour... by the way, setting the color to be transparent is simple even in Paint. Especially for *.gifs.
..... Umm, at this point, it's customary to explain.
Lexus Alyus wrote:Wow, I never knew cyan was so... blue...
It's 0 red, 255 green, 255 blue.
User avatar
SargeBaldy
Posts: 366
Joined: Tue Jul 15, 2003 3:49 pm
Location: Oregon
Contact:

Post by SargeBaldy »

pretty sure you're not supposed to use cyan on PNG images. just use the normal PNG transparency.
User avatar
Enjay
 
 
Posts: 27445
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Lexus Alyus wrote:Cyan? I never knew there waa cyabn colour in doom...
Pretty sure that's the point. There is no cyan in Doom, so you can make an image with cyan in it that a doom graphics tool will use for creating transparent areas in the doom format. If cyan was in the doom palette, then doom tools would not know whether the areas you had marked with cyan were supposed to be visible cyan or converted to transparent areas.

I think the reason cyan has become a standard in many tools is that the earliest ones (eg dmgraph.exe) used it and it kind of became the norm. However, DeePsea uses magenta (by default) and some versions of deutex used a muddy sort of green by default.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Ha, that makes sense now you mention it :-D

The simplest things always surpass me... for some reason...

:twisted:
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

SargeBaldy wrote:pretty sure you're not supposed to use cyan on PNG images. just use the normal PNG transparency.
You can use any palette index actually, convert the image to a 256 color png and then set a color transparent, cyan is a good one to use just because it makes the sprite stand out from the transparency (though if you forget to set it to transparent in the PNG then it'll show up as a light blue in Doom, the closest color the palette has to cyan). PNGs don't even need to be in the doom palette as ZDoom will convert them for you.

This actually allows for maps that work in Doom, Hexen and Heretic (and Strife) if you make all the textures 256 color pngs and do some kind of wacky item/monster placement scripts (if finding out the game type is even possible). It would be more trouble than it's worth, but still kinda neat I think (I've already made one myself with a single sector box and a player1 start and that's it).

Enjay: most wad tools base transparency conversions on a palette index and not the actual color in the bmp I believe. Cyan is often (incorrectly) set as index 247 because none of the graphics in the original doom use that idice, though a few in doom2 do. With most (all?) graphics tools, for example, I'm pretty sure you couldn't make a patch with all 256 colors of the pal in it, though it's perfectly possible.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Enjay wrote:If cyan was in the doom palette, then doom tools would not know whether the areas you had marked with cyan were supposed to be visible cyan or converted to transparent areas.
Unless of course the "transparent" Cyan was 0, 255, 255, and the displayable cyan was 1, 255, 255.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Cyb wrote:With most (all?) graphics tools, for example, I'm pretty sure you couldn't make a patch with all 256 colors of the pal in it, though it's perfectly possible.
Obviously. To use 256 colors plus transparency, you'd need either greater than 8-bit depth or an alpha channel.

Edit: Reworded it to make more sense
Last edited by Risen on Fri Apr 02, 2004 11:17 am, edited 1 time in total.
User avatar
Enjay
 
 
Posts: 27445
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Cyb wrote:most wad tools base transparency conversions on a palette index and not the actual color in the bmp I believe.
Yes, of course. Makes sense.
Locked

Return to “Editing (Archive)”