This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Openexr transparency issue

Tags: None
(comma "," separated)
mikeholder
Registered Member
Posts
47
Karma
1

Openexr transparency issue

Fri Feb 23, 2018 8:36 pm
I want to use Openexr format to export from Blender, so I can have values outside the 0-255 range. But . . . .

Whenever I load an Openexr into Krita, both single and multi-layer Openexr, the transparent pixels show up as pure black. I don't know much about Openexr, but I know something is wrong, because Gimp can open single-layer Openexr and the alpha channels work as expected, with transparency.

Does anyone else use Openexr and can tell me what I am doing wrong?

Krita 4.0.0 beta 1
Mint 18
mvowada
Registered Member
Posts
322
Karma
1

Re: Openexr transparency issue  Topic is solved

Fri Feb 23, 2018 8:51 pm
mikeholder wrote:Does anyone else use Openexr and can tell me what I am doing wrong?

(main menu) "Image" > "Properties..." > "Background Opacity"=0?
mikeholder
Registered Member
Posts
47
Karma
1

Re: Openexr transparency issue

Fri Feb 23, 2018 10:36 pm
That almost works, but it adds some transparency to pixels when the alpha value should be 100%.

And I wonder why this option is even needed, if the file is saved and the alpha value of some pixels is less than 100%, shouldn't Krita open it with the proper alpha values? In Blender, I can use the left mouse click on the render results screen and I can see the alpha values per each pixel. This is so weird. The idea of a multi-layer Openexr is to export all the passes like diffuse, specular, and shadow to a multi-layer file. Gimp 2.9 is great with single layer, but my hope was to have all the passes in a single file.
mvowada
Registered Member
Posts
322
Karma
1

Re: Openexr transparency issue

Sat Feb 24, 2018 2:36 am
mikeholder wrote:That almost works, but it adds some transparency to pixels when the alpha value should be 100%.

In Blender, when I render a layered EXR modified with Krita I don't see any added transparency to 100% opaque pixels.
mikeholder wrote:my hope was to have all the passes in a single file

Actually I can see all the passes of a layered EXR as layers in Krita.
mikeholder
Registered Member
Posts
47
Karma
1

Re: Openexr transparency issue

Mon Feb 26, 2018 12:29 pm
Okay, I stopped doing this on Friday, but now I am back to it today and I want to share my issue.
This is the check in Blender of a specific pixel. Alpha value is 1.0:
Image
And then I save it as an Openexr and open in Krita, testing the exact same pixel on the 'combined' pass:
Image

What is going on here? I mean I understand that this may be an issue outside of Krita. Perhaps it is Blender, or maybe it is how Openexr itself works. I have no idea what is going on here. That pixel should be 100% alpha. Not only that, but something has changed the RGB values. I think the Blender community has collectively lost its mind over the new Filmic tone mapping, and that may be the issue because I am trying it now, but it should not have changed the apha values.
mikeholder
Registered Member
Posts
47
Karma
1

Re: Openexr transparency issue

Mon Feb 26, 2018 12:35 pm
Actually, I take that back; I am not using the Filmic colors in that shot
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Openexr transparency issue

Mon Feb 26, 2018 12:37 pm
Well, I don't remember the details, it's ages since we last touched the exr converter code, but alpha was always tricky, I seem to remember. http://www.openexr.com/TechnicalIntroduction.pdf has some details.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Openexr transparency issue

Mon Feb 26, 2018 12:47 pm
That's due premultiplied alpha. Krita doesn't premultiply alpha or have such color spaces, I think for openexr it is intended to be the default.

You can see this by doing some maths:
Red = 0.227279 * 0.753587 = 0.171274499773
Which is... almost the same value as in blender, but sure a lot closer than unmultiplied :)

The final difference might be related to the filmic tone mapping, as you say, or could be something else. (If you can reproduce this RGB difference on an exr where you don't think the tonemapping is fiddling with things report a bug with an attached exr.) (You could also see if there's other programs wich can view exrs that show the problem or not at all, to be sure)
mikeholder
Registered Member
Posts
47
Karma
1

Re: Openexr transparency issue

Mon Feb 26, 2018 12:54 pm
Actually, I think I figured this out. . . hold on
mikeholder
Registered Member
Posts
47
Karma
1

Re: Openexr transparency issue

Mon Feb 26, 2018 1:05 pm
Ok TheraHedwig is probably right, and mvowada was correct from the beginning.

I did not notice the sample radius in my color picker. Wow this is a little embarrassing. On Friday I almost threw my computer out the window over this oversight. I had this massive sample radius on my color picker, so of course I was getting strange alpha values. Now having admitted that, the RGB values are still slightly different.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]