Page MenuHome

Unable to pack grayscale images into RGBA channels when using A channel
Closed, InvalidPublic

Description

System Information
Operating system: Win10 64b
Graphics card: Geforce GTX 1060 3GB

Blender Version
Broken: blender-2.80-6b39dc7672eb-win64

Short description of error

I'm trying to use the composite to pack as much grayscale masks into a single image with a combine node to use in a game engine, this technique is widely used to save memory during the game execution.

I have no problem when packing images to RGB channels, but when I try to pack a fourth image using the alpha channel, the R, G and B channels are affected by artifacts caused by the alpha channel, this one (A channel) exports fine though.

Exact steps for others to reproduce the error

I drew this four simple textures and packed into a blend file:

When I pack the first three into an RGBA image, without using the A Channel, everything goes fine: (I'm using unreal engine to see each channel)

But when I try to pack a fourth image using the A channel, the other three get corrupted, the rendered image looks fine, but each channel viewed separately looks bad:

The attached file contains the four images and the compositor setup:

Details

Type
Bug

Event Timeline

After the "Combine RGBA" node you have an image with Premultiplied Alpha.
When you save as PNG, image is converted to Straight Alpha, and the channel values change.

Try to save in the EXR format.

It worked! Thank you very much.

Sorry for posting this problem here, I assumed it was a bug since other software that do similar things, like Substance Designer, allow to do that with PNG and TGA.
Is there any plan for an option that let me control that option for PNG an TGA? maybe an option in the File Output node?

Sebastian Parborg (zeddb) closed this task as Invalid.
Sebastian Parborg (zeddb) claimed this task.

Sadly this is not the case. Only exr is able to save lossless atm. This has been requested before but this counts as a feature request and should go to:
https://blender.community/c/rightclickselect/