Optimize HDR layer glitches out

Here everybody can post his problems with PhotoLine
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Optimize HDR layer glitches out

Beitrag von freeqstyler »

Hi,

I'm using Photoline for postproduction of 3D renders and thus working mostly on 32-bit EXR files, for convienience placed as placeholder layers into a 16-bit pld file. Since switching from Photoline 21.50 to 22.01 I'm experiencing a glitch/error. As part of my non-destructive workflow I am often using several layers with an Optimize HDR adjustment. The problem is, when after setting up these adjustments I proceed with further editing, the image randomly glitches out and darkens (see the attached screenshots). This is not only a visual glitch of the UI - it appears also on an exported, flattened image. The only way to temporarily resolve this is to hide and then reveal one of the Optimize HDR layers (or reload the file).

To reproduce the error, please see the file from this link:

https://drive.google.com/file/d/1hoYqwS ... sp=sharing

Keep the bottom layers (banner3d with two Optimize HDR adjustments) as they are and play around with the rest - copy some layers, add new ones, do some painting, change some parameters in levels adjustment etc. The image should suddenly darken after a few operations.

This bug did not occur in Photoline 21.50. My specs:

AMD Ryzen 1700X
16GB RAM
NVidia Geforce 1060 GTX 6GB

I would appreciate your help with resolving this issue.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Optimize HDR layer glitches out

Beitrag von Martin Huber »

freeqstyler hat geschrieben: Do 14 Mai 2020 21:54Keep the bottom layers (banner3d with two Optimize HDR adjustments) as they are and play around with the rest - copy some layers, add new ones, do some painting, change some parameters in levels adjustment etc. The image should suddenly darken after a few operations.
The document darkens when caching of "banner3d" kicks in (after about 30 seconds).

It darkens because the embedded document of the placeholder has a linear sRGB color profile and the cache ignores that profile. We will fix that.

You can circumvent the problem by manually assigning a linear sRGB profile to the placeholder layer by using "Tool > Color > Assign Color Profile":
- Choose "sRGB IEC61966-2.1"
- Check "Linear Brightness (Gamma 1.0)"
- Check "Layer"

Martin
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

Manually assigning the color profile works well. Thanks for the help!
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

So, the bug seems to have returned in 22.50. Even worse, for the image I linked in the first post, I cannot manage to achieve the proper result even through manually assigning a color profile (fortunately somehow it works in my other projects).
Benutzeravatar
shijan
Mitglied
Beiträge: 1497
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Optimize HDR layer glitches out

Beitrag von shijan »

Just checked and there is no problem in 22.5. Maybe some mistake from your side? Are you sure that you apply ICC profile to Layer but not to Document?
Bild
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Optimize HDR layer glitches out

Beitrag von Martin Huber »

freeqstyler hat geschrieben: Mo 07 Dez 2020 08:26 So, the bug seems to have returned in 22.50. Even worse, for the image I linked in the first post, I cannot manage to achieve the proper result even through manually assigning a color profile (fortunately somehow it works in my other projects).
As shijan said, assigning the linear color profile to the placeholder should work (and it does here on my computer).

But you shouldn't have to a assign a linear color profile in the first place, because the embedded EXR is already in that linear color space. I will check that.

Martin
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

shijan hat geschrieben: Mo 07 Dez 2020 09:38 Just checked and there is no problem in 22.5. Maybe some mistake from your side? Are you sure that you apply ICC profile to Layer but not to Document?
Bild
Yes, and what is odd, regardless what ICC profile I assign for this layer it doesn't change anything (see attached screenshot). I am a bit dumbfounded, especially because the workaround works for my other files, but not for this one.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Martin Huber
Entwickler
Entwickler
Beiträge: 4159
Registriert: Di 19 Nov 2002 15:49

Re: Optimize HDR layer glitches out

Beitrag von Martin Huber »

You could try the current beta https://www.pl32.com/forum3/viewtopic.p ... 493#p48397.

With this version you shouldn't have to a assign a color profile.

Martin
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

Martin Huber hat geschrieben: Mi 09 Dez 2020 09:38 You could try the current beta https://www.pl32.com/forum3/viewtopic.p ... 493#p48397.

With this version you shouldn't have to a assign a color profile.

Martin
I downloaded the beta and the bug seems to be fixed. Thanks!

The weird issue with my example image being too dark persists though. I think I found the culprit of the problem and it is the inconsistent behavior of Photoline's color management.

Please clarify whether I understand it properly - the Activate Color Management option (the one in Edit->Options->Color Management->Devices) allows the user to override the system-wide ICC profile settings and if it is disabled, Photoline should use the default profile set in the system (in my case sRGB IEC61966-2.1), but still honor the ones specified per layer/placeholder/document. It seems to work like that in case of this file (and my other projects as well, so I presume this is inteded by design):

https://drive.google.com/file/d/1XgDZKo ... sp=sharing

However, in the example I showed earlier:

https://drive.google.com/file/d/1hoYqwS ... sp=sharing

when I disable color management, all the profiles in the file seem to be overridden by standard sRGB, even the ones I manually set per layer. If I enable the color management, everything works fine. I can't find the reason why there is such a difference in Photoline's behavior between those two files, maybe there is some option I omitted?
Benutzeravatar
shijan
Mitglied
Beiträge: 1497
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Optimize HDR layer glitches out

Beitrag von shijan »

You may disable Color management in rare and unusual situations if you do input-output transformations with LUTs or some similar custom workflows. I guess a lot of tools and filters may work incorrectly with disabled color management.
Linear EXR from 3D renders are formally use sRGB color space, but it is 32 bit depth float data that needs proper tone and saturation mapping. Wide gamut color space directly from render just compressed in 32 bit to sRGB in lossless linear way and require some saturation mapping post processing (similar to tone mapping for dynamic range mapping). So you need to decompress all that color data back to any desired wide color space, and transform back to sRGB with some proper saturation mapping tools. I described some info about EXR processing workflow in Davinci Resolve here https://www.pl32.com/forum3/viewtopic.p ... 071#p48071 Still don't know how do it in same way in PhotoLine, still can't learn how to use Optimize HDR tool.
Bild
Bild
Bild
Bild

Here is how PhotoLine color Management works in Document Mode:
Bild

Here is also another chart color management in Document, Layers and Groups structure.
Note that Color managed Isolated Group introduced only in version 22.90b1.
Bild
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

I know the general principles of color management (I admit, it still can be difficult for me to set it up correctly) but I had some issues with its implementation in Photoline in the past and that's why I disabled it (I don't remember details, but it seems that this is no longer the case now). For the sake of curiosity I decided to explore the behavior with disabled CM further though.
shijan hat geschrieben: Mi 09 Dez 2020 22:17 Note that Color managed Isolated Group introduced only in version 22.90b1.
Eureka, and there's the culprit! When I put the placeholder "banner3d" into an isolated group the profile from exr magically starts working.

To further investigate, I experimented a bit and assigned a PSO Coated v3 profile to the document to see if it will additionaly affect the image with CM disabled/enabled (see attachement). Also I checked with different types of layers to see if they are affected in different way.

As I understand it, when CM is disabled, Photoline should:
- ignore all the color profiles completely and always default to the one set in the system (standard sRGB)

And with Color Management enabled it should:
- honor the profiles set in layers/groups/placeholders etc. but default to ones set in general Photoline options when no profile is set

What actually happens now with CM disabled is:
- ignore all the color profiles completely and always default to the one set in the system (standard sRGB) for all layers other than Placeholders
- ignore all the color profiles completely unless the layer is put into an isolated group for Placeholders

Turns out my workflow was giving correct results but for wrong reasons (and the reason is bugged interaction of placeholders with ICC profiles). You are probably right that I should keep the Color Management activated but I also think this is a thing for developers to investigate.

Of course unless I'm completely misunderstanding the whole CM thing.
shijan hat geschrieben: Mi 09 Dez 2020 22:17 Still don't know how do it in same way in PhotoLine, still can't learn how to use Optimize HDR tool.
Usually for me the standard conversion from linear sRGB to working space is enough. I use Optimize HDR for small gamma corrections afterwards and sometimes second Optimize HDR to darken unwanted highlights etc. Then some LUT with partial opacity to achieve more realistic "feel". I am aware this approach isn't really "scientific" nor industry standard but it works for me. Just now I tried to fiddle around with LUTs extracted from Resolve to achieve the same effect you mention but with no success either. Guess the LUT implementation is Photoline is somewhat different from Resolve.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
shijan
Mitglied
Beiträge: 1497
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Optimize HDR layer glitches out

Beitrag von shijan »

freeqstyler hat geschrieben: Do 10 Dez 2020 08:33What actually happens now with CM disabled is:
- ignore all the color profiles completely and always default to the one set in the system (standard sRGB) for all layers other than Placeholders
- ignore all the color profiles completely unless the layer is put into an isolated group for Placeholders
Seems Placeholders work in some special way. I personally avoid Placeholders and still consider them as experimental option, because also had some issues with them in past.
freeqstyler hat geschrieben: Do 10 Dez 2020 08:33Just now I tried to fiddle around with LUTs extracted from Resolve to achieve the same effect you mention but with no success either. Guess the LUT implementation is Photoline is somewhat different from Resolve.
I guess you may just setup Resolve color management incorrectly, so your generated LUT produce wrong result. It should be no problem to generate LUT from Resolve CST Node With proper tone and saturation mapping. Try this:
In Resolve:
1. Set project to YRGB (non color managed)
2. set timeline settings to RED Log3G10/RED WideGamut.
3. add CST node Linear/sRGB to RED Log3G10/RED WideGamut (do not turn on luma and saturation mapping here)
4. add CST node RED Log3G10/RED WideGamut to sRGB. turn on luma and saturation mapping here.
5. Right click to clip and export x65 LUT.

In PhotoLine:
1. Switch to Document mode.
2. Set Document profile sRGB (do not enable Linear gamma)
3. Do not apply any ICC profile to image layer, but just apply LUT generated in Resolve to it.
Zuletzt geändert von shijan am Do 10 Dez 2020 14:33, insgesamt 2-mal geändert.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Benutzeravatar
shijan
Mitglied
Beiträge: 1497
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Optimize HDR layer glitches out

Beitrag von shijan »

... and my sRGB linear -> RED Log3G10/RED WideGamut -> sRGB with luma/saturation mapping LUT doesn't work :) some clipping in some color spaces transformations...
Bild

Looks better with another LUT (sRGB linear -> Davinci Log/Davinci WideGamut -> sRGB with luma/saturation mapping) but there is still some tonal clipping due some unknown reason.
Bild
So yep, tone mapping LUTs imported from other apps are also not perfect. Hope wi will see somewhere in future some advanced tone and saturation mapping tools directly with PhotoLine tools.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Benutzeravatar
shijan
Mitglied
Beiträge: 1497
Registriert: Mo 23 Dez 2019 15:21
Wohnort: Ukraine

Re: Optimize HDR layer glitches out

Beitrag von shijan »

Here is how same image 32 bit EXR looks with native "Optimize HDR" tool applied to layer in linear gamma. Pretty decent result! And colors are not overloaded like in Photoshop tome mapping tool.
Bild
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
freeqstyler
Mitglied
Beiträge: 15
Registriert: Mi 13 Mai 2020 20:15

Re: Optimize HDR layer glitches out

Beitrag von freeqstyler »

shijan hat geschrieben: Do 10 Dez 2020 11:06 ... and my sRGB linear -> RED Log3G10/RED WideGamut -> sRGB with luma/saturation mapping LUT doesn't work :)
Would it work if you converted your LUT to an ICC profile and then assigned it to the image? Of course you would lose control over fine-tuning but if all you want is to convert one color space to another, it theoretically should work, right?