Page MenuHome

Blender compositor seperate and combine rgba yields different image.
Closed, ArchivedPublic

Description

System Information
Operating system: Windows 10 Pro
Graphics card: GTX 1080ti

Blender Version
Broken: 2,80, 91a155833e59
Also happens in most recent 2.7

Short description of error
When inputting and image, splitting the color channels and recombining them. The output is different than the original even though it shouldn't be


(The image above shows the Alpha channel from the image input node not being used. However, using that yields the same results.
Here's a better view of how blender changes the image. It doesn't just change the colors, but the smooth gradients from the original image are "corrupted" in a way.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

  1. create an image input node and load the image from this file{F6266631}
  2. attach the Image output to the input of a "Seperate RGBA" node
  3. attach the outputs of "Seperate RGBA" node to the corrosponding inputs on a "Combine RGBA" node
  4. attach the output of the "Combine RGBA" node to a file output node with TGA RGBA format
  5. render and compare input and output

Details

Type
Bug

Event Timeline

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

This is not because of the split node (at least that didn't matter in my tests).

The reason for this is that blender applies color correction to the output images.
This is not really a bug, but a intended feature.

However if you would like blender to not touch the colorspace, that is a feature request and should go to https://blender.community/c/rightclickselect/

Is there any possible workaround i could use as of now ?

Sebastian Parborg (zeddb) reopened this task as Open.EditedJan 28 2019, 2:17 PM
Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

Actually, this might be a issue with alpha channels. Disable alpha on the image node and the output image seems fine if you set the view transform from filmic to default

Brecht Van Lommel (brecht) closed this task as Archived.

It appears that the application you are using to view the image is ignoring the alpha channel. If the alpha channel is taken into account the image should appear correctly.

What happens is that the Blender compositor works with premultiplied alpha. TGA files have straight alpha, so there is a conversion back and forth which ends up rebalancing data between the RGB and alpha channels. The combined result is still the same, but if you look at the RGB and alpha channels individually there will be a difference.

We do not consider this a bug. Premultiplied alpha is the standard in VFX and that's what the compositor is aimed at.

So what you're getting at is that it isn't possible to store different information in R, G, B, and A channels.
In terms of VFX in the real-time industry this is very much a needed feature, since you often need textures containing non-color data

In case i wasn't being clear, the information stored in the alpha channel is completely different than the data stored in, for example, the red channel.

For input you can set the image colorspace to Non-Color. For output you can write EXR files, which will not do any changes to the data. There is no support for writing Non-Color data TGA Files.

The typical VFX workflow would be to keep everything in EXR files and only do some conversion to other formats at the end.