Need help with SetPNG and true colour alpha PNGs
Moderator: Graf Zahl
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Need help with SetPNG and true colour alpha PNGs
I have a Doom 2 logo replacement (replaces M_DOOM).
The original graphic is a true colour PNG. Why true colour? Because I need the transparency information for a smooth gradient fade out effect that my graphic uses. If I convert the PNG to 8-bit, Photoshop discards the transparency.
Anyway, all works well but then comes the problem of setting the offset.
I know how to use SetPNG to set offset for PNGs, but for some reason SetPNG refuses to work for my graphic. I did a test and converted it to 8-bit (and lost the transparency) and suddenly SetPNG works (successfully saves the offsets). Tried it again with true colour and it doesn't work.
I'm stumped. Are there any workarounds?
The original graphic is a true colour PNG. Why true colour? Because I need the transparency information for a smooth gradient fade out effect that my graphic uses. If I convert the PNG to 8-bit, Photoshop discards the transparency.
Anyway, all works well but then comes the problem of setting the offset.
I know how to use SetPNG to set offset for PNGs, but for some reason SetPNG refuses to work for my graphic. I did a test and converted it to 8-bit (and lost the transparency) and suddenly SetPNG works (successfully saves the offsets). Tried it again with true colour and it doesn't work.
I'm stumped. Are there any workarounds?
- Shinjanji
- Posts: 198
- Joined: Sun Nov 06, 2005 16:45
- Location: Pennsylvania, USA
hmm... IIRC, PNG files have various bits of extra header information in them. SetPNG probably writes information into these headers that ZDoom/GZDoom looks for. If you found out what it wrote (you could find out with a test graphic or look through the source code) then you might be able to manually add the information to your PNG.
Though well-knowing of the limits of my ability to troubleshoot, there is either a much easier solution, or I have all of my information totally wrong. TRY IT AT YOUR OWN RISK! XD
Though well-knowing of the limits of my ability to troubleshoot, there is either a much easier solution, or I have all of my information totally wrong. TRY IT AT YOUR OWN RISK! XD
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
8 bit formats fully support translucency. I think it's time to look for better tools. Photoshop is utter crap when it comes to PNG support. Google for PNGQUANT. It is a small command line tool that should help you convert your picture to 8 bit while retaining the alpha channel.
But since you are replacing an original patch your best way of action is to use the 'remap' function of HIRESTEX. At this moment GZDoom does not read offset information from hires PNGs.
But since you are replacing an original patch your best way of action is to use the 'remap' function of HIRESTEX. At this moment GZDoom does not read offset information from hires PNGs.
-
- Posts: 130
- Joined: Sat Oct 08, 2005 19:22
Your clearly using it incorrectly if thats what you thinkGraf Zahl wrote:8 bit formats fully support translucency. I think it's time to look for better tools. Photoshop is utter crap when it comes to PNG support.

Nor should it IMO.At this moment GZDoom does not read offset information from hires PNGs.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
-
- Posts: 130
- Joined: Sat Oct 08, 2005 19:22
IMO that offset info is NOT metadata, as such it doesn't belong in the resources.Enjay wrote:Why not?DaniJ wrote:Nor should it IMO.
At a guess I would say this is due to GZDoom converting the PNGs to the DOOM palette. Please don't blame Photoshop as it certainly does handle this very well indeed. The problem with PNG is that there isn't a seperate alpha channel (as there is in TGA for example), this means that alpha must be applied to the base layer in a "destructive manner".PNGs with one transparent colour works (holes will appear on the model) but I can't seem to create smooth gradient skins that fade out.
Or is it another "Photoshop is crap" issue?
The way to best use Photoshop when alpha is required is use the native PSD format as your "master", with a "layer mask" for your alpha channel. When you save as PNG Photoshop will convert the alpha channel down to the base layer as required for PNG.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
-
- Posts: 130
- Joined: Sat Oct 08, 2005 19:22
True but these arn't nearly the only reason to sort model polys.And model explosions aren't worth the effort IMO
Most models use alpha to create details that can't be modelled due to the massive number of extra polys it would require.
For example monsters, might be modelled so that hair is made up of several layers of alpha'd polygons. Other examples would be a Wizards' tattered robes or the 3D spinning plasma shots, muzzle flashes etc etc in the jDRP 1.1 alpha.
Not supporting texture alpha for models severely limits what the artist can create.
However if you can't sort them in GZDoom at present, Graf is right to force model textures to be opaque, as the results would look awful otherwise.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
Dani, any person in their rightful mind wouldn't work with PNG alone.
I never work without keeping the PSD master (or source as I like to call them) files.
But I just wanted to preview my image that was ran through pngquant to see if the transparency information is kept and was surprised to see a bunch of red mess.
It displays fine in GZDoom, so (unfortunately) I'm gonna have to agree on Graf with this one (despite me being a Photoshop fanboy) - PS is crap at that area!
Don't get me wrong though, I still love PS. PS 4eVa
I never work without keeping the PSD master (or source as I like to call them) files.
But I just wanted to preview my image that was ran through pngquant to see if the transparency information is kept and was surprised to see a bunch of red mess.
It displays fine in GZDoom, so (unfortunately) I'm gonna have to agree on Graf with this one (despite me being a Photoshop fanboy) - PS is crap at that area!
Don't get me wrong though, I still love PS. PS 4eVa
