Unable to pack grayscale images into RGBA channels when using A channel #62523

Closed
opened 2019-03-13 03:57:59 +01:00 by Oscar Dario Franco · 11 comments

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:

images.png

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)

RGB.png

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:

RGBA.png

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

channelsTextures.blend

**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: ![images.png](https://archive.blender.org/developer/F6812650/images.png) 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) ![RGB.png](https://archive.blender.org/developer/F6812654/RGB.png) 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: ![RGBA.png](https://archive.blender.org/developer/F6812657/RGBA.png) The attached file contains the four images and the compositor setup: [channelsTextures.blend](https://archive.blender.org/developer/F6812681/channelsTextures.blend)

Added subscriber: @OscarFranco

Added subscriber: @OscarFranco

Added subscriber: @jenkm

Added subscriber: @jenkm

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.

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?

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?

Added subscriber: @ZedDB

Added subscriber: @ZedDB

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sebastian Parborg self-assigned this 2019-03-13 15:28:00 +01:00

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/

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/

Added subscriber: @TMug

Added subscriber: @TMug

This kind of feature would be more than useful when dealing with packed game art. Because of this design how the alpha is used, the user is forced to use external program to do the packing or convert the saved EXR to a different format. By being able to do the packing with compositor, this would eliminate the need to open other programs for this kind of work.

This kind of feature would be more than useful when dealing with packed game art. Because of this design how the alpha is used, the user is forced to use external program to do the packing or convert the saved EXR to a different format. By being able to do the packing with compositor, this would eliminate the need to open other programs for this kind of work.
Contributor

Added subscriber: @AndresStephens

Added subscriber: @AndresStephens
Contributor

I tend to agree, this isn't a feature request but a broken feature with some file formats and how they pack channels.

I tend to agree, this isn't a feature request but a broken feature with some file formats and how they pack channels.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#62523
No description provided.