More options to pack different channels into a single image for game dev.
Right now, if I want to pack four grayscale images into a single image with the "File Output" node in the compositor, I can use only EXR, since the change from premultiplied to straight alpha affects the RGB channels when trying to pack an alpha channel in PNG and TGA. It'd be nice to have an option to allow me to save an alpha channel using PNG and TGA without loss in the R, G and B channels.
As a reference, here's an extended review of the problem:
2 Comments
Unless I'm misunderstanding things, this kind of sounds like a bug... or an implementation curiosity. The PNG spec is very clear in that the file format only supports straight alpha. I'm assuming that Blender uses premultiplied alpha internally, so technically, the implicit conversion to straight alpha is the correct way to proceed. But that's also under the assumption that you're treating the PNG as an image, rather than a packing structure for non-image data.
Sounds like a kind of tough problem to solve cleanly. It's not technically difficult (for years Blender incorrectly only saved PNGs as premultiplied alpha). It's more of a question of interface, I'd say.
* @Jason van Gumster * not a bug, according to the replies in the reference link, it's the intended way for blender to work (I had posted it as a bug there). They suggested to post it here as a feature request.