Game Development Community

Does Photoshop 7.0 handle PNG's alpha layer correctly?

by Anthony Rosenbaum · in General Discussion · 05/12/2002 (8:26 am) · 13 replies

does anyone know? also will the torque engine be modified to handle the new .png format?

#1
05/12/2002 (9:14 am)
No, Photoshop 7 does not export PNGs with Alpha channels. What it instead does is any transparent area of a layer (or layers) is treated as the alpha channel when the program flattens the layers upon export to the PNG file.

I think people might have to start to create their own 8-bit textures to do the reflection or bump mapping effects to get around this change in how Photoshop handles PNGs.

Logan
#2
05/12/2002 (9:17 am)
sounds like I just have to keep a version of 5.0 around just for conversion
#3
05/12/2002 (9:20 am)
Why? Creating or exporting your alpha channel (or any other layer) to a simple 8-bit raster image is simple.

You might as well keep using Photoshop 7 since you paid a fair bit of money for it and its new features that it offers.

Logan
#4
05/12/2002 (9:22 am)
oh I see what you mean, use a totally seperate geyscale image for the alpha. I just wanted too keep the file amount down.
#5
05/12/2002 (12:45 pm)
I don't have PS 7 yet, but in 6 if you "Save for Web" it saves PNG's correctly.
#6
05/12/2002 (1:44 pm)
Kevin, it take the alpha channel and saves it instead of makeing one with the transparent layer? have you done this and got it working the engine?
#7
05/12/2002 (2:18 pm)
oh, it won't save a custom alpha channel as a mask if that's what you mean, but it will save transparent layers. You can just Ctrl click your alpha channel and select it. Then just delete it or add a layer mask and it should work without a problem. If you "save" or "save as" a PNG it will not work correctly with a transparent PNG. You have to save for web in order for it to properly save.
#8
05/13/2002 (9:29 am)
Note that PS7 treats TGA in the same way =\

It's possible that some people aren't totally clear on why this is a Bad Thing, and why it causes people to replace the new PNG/TGA format plugins with older versions:

If you're creating alpha channels for purely transparency reasons, it's not that bad. In fact, it might be slightly easier, workflow-wise, because you almost definitely already have your objects in layers, so you save the step of creating an alpha channel from all your layers.

Where this becomes a problem, as CapnRook mentions, is when you are using the alpha channel to control something other than transparency, such as the strength of environment mapping in Torque. A common scenario would be to have your player skin, with some metal armor. You only want the armor to be shiny. The old way was real easy - just add an alpha channel, and paint over where the armor is. The new way is not easy. In fact, it's impossible, because you would have to hide the non-armor layers in order to get the armor "transparency" info to save - and of course then the non-armor skin isn't output!

The changes to the format plugins in PS don't just affect saving, they affect how the textures are loaded too. An example is the orc skin from Realm Wars (the CVS one, not the one that was released). Go ahead and load it into PS6 or 7 - you'll only get the parts that are supposed to be enviromapped.

Adobe aren't totally at fault if you think about it. I mean, transparency info is supposed to be for.. transparency info, right? It's just unfortunate for us that they've chosen to strictly adhere to this idea now, instead of giving us the freedom we had before.
#9
05/15/2002 (9:14 am)
I don't think it is "impossible" it will just require a different approach to texture design. There is so much flexibility on how the layers in PS can be manipulated I am positive that a change in workflow is all that is needed.
#10
06/24/2002 (11:52 pm)
Paint Shop Pro supports the Photoshop plugin api, and so it should be possible to write a custom exporter for PNG files for paint shop pro using the PNG library available.

I may have a try at this one day, but don't hold your breath!
#11
06/25/2002 (12:00 am)
PSP 6/7 (aka Paint Shop Pro) exports and displays PNG files with alpha channels for Torque fine.

PS 6/7 (aka Photo Shop) does not export, nor display PNG files with alpha channels correctly for Torque (without manipulation the save process, or changing files)
#12
06/25/2002 (12:06 am)
Odd.

I have no trouble saving PNG files with alpha in Photoshop, and yet my version of Paint Shop Pro 7 refuses to even save a PNG image with an alpha layer.

Sorry about making the confusion, however the post still applies. A plugin for Photoshop could solve these issues.