Png partial-transparency does not work

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
kinkyfriend85
Posts: 17
Joined: Mon May 01, 2006 16:27

Png partial-transparency does not work

Post by kinkyfriend85 »

Png transparency does not work (where transparency is not 100% but let's say 75%) it shows all pixels as non transparent...
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

You mean Alpha CHannels? I don't think they are supported.. and this sounds like a bug not a feature suggestion.
User avatar
Shinjanji
Posts: 198
Joined: Sun Nov 06, 2005 16:45
Location: Pennsylvania, USA

Post by Shinjanji »

Are you importing the PNGs properly?
User avatar
kinkyfriend85
Posts: 17
Joined: Mon May 01, 2006 16:27

Post by kinkyfriend85 »

Shinjanji wrote:Are you importing the PNGs properly?
Obviously or they wouldn't show up at all, yeah I guess I posted this at wrong thread...
User avatar
Sir_Alien
Posts: 80
Joined: Tue Sep 13, 2005 8:23
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

kinkyfriend85 wrote:Obviously or they wouldn't show up at all
Actually, that's not correct. Are you using XWE? If so, are you using "Load (Raw Data)" when you import your files?
User avatar
kinkyfriend85
Posts: 17
Joined: Mon May 01, 2006 16:27

Post by kinkyfriend85 »

Sir_Alien wrote:
kinkyfriend85 wrote:Obviously or they wouldn't show up at all
Actually, that's not correct. Are you using XWE? If so, are you using "Load (Raw Data)" when you import your files?
Hmm I guess I forgot to add that they are in zip file (I really thought I had done that in the first message here, but my bad.. If they were in a wad then they wouldnt stay transparent at all (except for the given colour that is transparent ingame) because once an image is copied to the wad then its changed to the given palette etc.. but in a zip if it doesnt work like it should, then it's not that there's something wrong with the pngs (and it is not.) The thing is that if I have partial transparency, lets say for a fire on a weapon sprite, the fire end up 100% solid everywhere.
User avatar
Sir_Alien
Posts: 80
Joined: Tue Sep 13, 2005 8:23
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

Have you followed the instructions in this thread?
User avatar
kinkyfriend85
Posts: 17
Joined: Mon May 01, 2006 16:27

Post by kinkyfriend85 »

Sir_Alien wrote:Have you followed the instructions in this thread?
That feature seems kinda weird, and I am not new to pnging or imaging at all (have done it for many years, only I am not as good with computer game graphics as I am with editing etc.) But I can still do some cool stuff, anyway
Why would I use some crazy "pngquant -force 256" when I am not even intending to use 256 colours? To me it seems like the engine doesnt like 50% transparency, at least for high colour pngs outside the wad, and thats stupid, but if it is like this then i'd rather use what I am than some weird feature.
And it seems intended for usage inside wads and not outside. Oh and I am using PSPX and very little of gimpage (for certain effects etc.)

Image
Image
Image

No fire in these, but this is as transparent as I can get them..
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Those screenshots you got there look really bizzarre :shock: like Foreverhood meets Silent Hill.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

kinkyfriend85 wrote:If they were in a wad then they wouldnt stay transparent at all (except for the given colour that is transparent ingame) because once an image is copied to the wad then its changed to the given palette etc.. but in a zip if it doesnt work like it should, then it's not that there's something wrong with the pngs (and it is not.)
Not true, in a number of ways. If you put a PNG in a WAD in its "raw" format (as XWE describes it) then the data is in the WAD as a png - not the Doom graphic format. My recently released Thief wad for Heretic has many textures and sprites in it - most of which are in PNG format and are in the WAD. They were not "changed to the given palette". They kept their own palette from the png graphic. I used DeePsea to put them in the WAD, but XWE can do it too - also without palette conversion.

Transparency is supported. Check the png sprites also in my Thief WAD. You save the png with transparency information using your graphics editor and it works in game.

There is no "given colour" that is transparent in game in the Doom graphic format - be it cyan, magenta or whatever. Those colours are only used by convention to mark areas that will be converted to truly transparent in the Doom graphic format.

Partial transparency can be made to work. The only way I have successfully managed is to have a normal image and a full colour one (with partial transparency) remapped to it using the hirestex lump. There may be other ways: I only did it to see if I could. I have not used it extensively.
User avatar
kinkyfriend85
Posts: 17
Joined: Mon May 01, 2006 16:27

Post by kinkyfriend85 »

Enjay wrote:
kinkyfriend85 wrote:If they were in a wad then they wouldnt stay transparent at all (except for the given colour that is transparent ingame) because once an image is copied to the wad then its changed to the given palette etc.. but in a zip if it doesnt work like it should, then it's not that there's something wrong with the pngs (and it is not.)
Not true, in a number of ways. If you put a PNG in a WAD in its "raw" format (as XWE describes it) then the data is in the WAD as a png - not the Doom graphic format. My recently released Thief wad for Heretic has many textures and sprites in it - most of which are in PNG format and are in the WAD. They were not "changed to the given palette". They kept their own palette from the png graphic. I used DeePsea to put them in the WAD, but XWE can do it too - also without palette conversion.

Transparency is supported. Check the png sprites also in my Thief WAD. You save the png with transparency information using your graphics editor and it works in game.

There is no "given colour" that is transparent in game in the Doom graphic format - be it cyan, magenta or whatever. Those colours are only used by convention to mark areas that will be converted to truly transparent in the Doom graphic format.

Partial transparency can be made to work. The only way I have successfully managed is to have a normal image and a full colour one (with partial transparency) remapped to it using the hirestex lump. There may be other ways: I only did it to see if I could. I have not used it extensively.
OFC I know how to save transparency in pngs, anyone who cant do that is a dumbass lol, unless they are noobs to imaging and don't know what programme to use. I really wonder whats the point with having to write some code to get partial transparency to work, kinda should work right away! (offtopic, me is thinking about making this project for Dreamcast Prboom as well, would result in some cut downs but whatever.)
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Dude, chill out.

I don't know why can't you get it to work.

I don't want to sound like I'm trying to teach a n00b but here are my steps:

A) Work on the image using my PSD master file (it has layer information, layer transparencies etc).

B) Once I'm ready to finalize the graphic, I prepare it by hiding unwanted layers. I even hide the background layer in Photoshop so all I get is true transparency.

C) Save As -> PNG file

D) Import into XWE (using "Load as raw data" command).

The result:

Works for me(tm).

[spoiler]Image
Image[/spoiler]
(WARNING NUDITY)

See? No coding or scripting or shitty command lines needed.

MAKE SURE YOU ARE USING THE LATEST XWE BETA. http://www.doomworld.com/xwe/
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Sorry to clutter up the thread, but how does one save a png with an alpha channel? PSP says I can't do that with pngs (saving them with an alpha channel). Like wtfcakes?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

PSP is stupid, it seems. PNG has full alpha support, both for paletted and non-paletted images. But if the software is too dumb to save it, it can be quite annoying. Most PNG-capable software is utterly clueless when alpha is concerned - especially with palettes.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Graf Zahl wrote:PSP is stupid, it seems.
:yup: This isn't the first time I hear this.
Locked

Return to “GZDoom”