Page 1 of 2

Png partial-transparency does not work

Posted: Sat May 13, 2006 23:51
by kinkyfriend85
Png transparency does not work (where transparency is not 100% but let's say 75%) it shows all pixels as non transparent...

Posted: Sun May 14, 2006 20:27
by Paul
You mean Alpha CHannels? I don't think they are supported.. and this sounds like a bug not a feature suggestion.

Posted: Sun May 14, 2006 20:29
by Shinjanji
Are you importing the PNGs properly?

Posted: Mon May 15, 2006 0:33
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...

Posted: Mon May 15, 2006 0:40
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?

Posted: Mon May 15, 2006 1:50
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.

Posted: Mon May 15, 2006 2:02
by Sir_Alien
Have you followed the instructions in this thread?

Posted: Mon May 15, 2006 2:32
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..

Posted: Mon May 15, 2006 12:08
by Paul
Those screenshots you got there look really bizzarre :shock: like Foreverhood meets Silent Hill.

Posted: Mon May 15, 2006 12:30
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.

Posted: Mon May 15, 2006 14:01
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.)

Posted: Tue May 16, 2006 9:34
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/

Posted: Tue May 16, 2006 15:05
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?

Posted: Tue May 16, 2006 15:09
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.

Posted: Tue May 16, 2006 15:20
by Paul
Graf Zahl wrote:PSP is stupid, it seems.
:yup: This isn't the first time I hear this.