32bit HDR black point and white point

Here everybody can post his problems with PhotoLine
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

32bit HDR black point and white point

Post by hdrhelp »

Hello,
I am trying out Photoline because I was told that it has robust 32bit and HDR controls.
I have an HDR image but it is only slightly beyond the normal range of tones available. My hope is to set the sun as a white point that is much brighter, comparable to what it was when I shot the image and suitable for HDRI usage in lighting a 3d model.
I open the file and have experimented with both HDR optimize and Levels tools. But it seems to me that I am not able to bring the white point or black point of the 32bit format in to where my image sun and darkest shadow are. I am aware that my image may get banding or posterization but that doesn't matter to me, I just want the general light qualities.
Can anyone give me advice on how to brighten the white in a 32bit image?
Thank you
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4167
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: 32bit HDR black point and white point

Post by Gerhard Huber »

Can you give us the image to see where the problem is?
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

Re: 32bit HDR black point and white point

Post by hdrhelp »

Hello, thanks for taking a look. attached below is a link to the image, I couldn't scale it down in 32 bit to attach. It is a frame from an HDR video sequence. I aim to process about 300 frames by an action/automation step. I believe that the video is 10bit HDR and this limits the range but I"m not sure how that intersects with the 32bit still. I just need to set a white for sun, really, but it would be great to hit black point and white point. Note that some of them are in shadow, so if I'm able to run an action, the levels correction should be consistent for HDRI lighting. Hope this makes sense. Thanks.
https://ibb.co/wKqhXyD
User avatar
shijan
Mitglied
Posts: 1604
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: 32bit HDR black point and white point

Post by shijan »

You shared 8-bit PNG image. it is not HDR image.

If you want to create true HDR, you need to convert it to 32-bit.
Open "View->Panels->Layer Attributes" and change Type to 32-bit.

In this case it will stretch all 8-bit dynamic range to full 32-bit range.
Then you can adjust tone mapping or clipping with Levels or with Optimize HDR. But i guess this additional adjustment makes no sense if you will use it as texture in 3D editor.

Save image to EXR or HDR format.
You can use "File->Functions->Batch Editor" combined with recorded Action to process multiple frames in one click.

P.S. Also don't be confused with 10bit HDR Log-based Tonal Response Curve video format (used to show films on modern HDR monitors) and "real" 32-bit HDR format that usually use Linear Tonal Response Curve. Those are totally different systems.
Also note that PhotoLine allow any gamma function for 32-bit depth. Unlike other apps, if you convert to 32-bit it will not automatically convert image to Linear gamma.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

Re: 32bit HDR black point and white point

Post by hdrhelp »

Hi,
I see that the image host that I used does actually share a highly modified png version! Sorry about that. I first tried to attach to this thread but it's got a limit of 128k and I couldn't get the exr to fit there at all. So here is a dropbox link to the exr. https://www.dropbox.com/s/e6fyhqpnlyyzs ... y.exr?dl=0
Thanks or the suggestions about converting, @shijan. Yes, I know that the video file is a different beast, it is the 10bit kind, I presume the version that you indicated. I don't know of other 10bit video versions. I believe that it is beyond standard 8bit image white already but perhaps not. But this is what I have and am trying to remap to a reasonable 32bit white for the sun and a black for the shadow. Again, I'm not super concerned about how it will "look" but more about how I can use these files as a sequence of images as HDRIs to light a 3d project (in blender).
Thanks for pointing out the Batch editor! I have not used this software and I am pretty impressed with how well it replaces other software I have used - plus apparently it has better 32 bit HDR controls.
User avatar
shijan
Mitglied
Posts: 1604
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: 32bit HDR black point and white point

Post by shijan »

See Collection of Tutorials in English viewtopic.php?f=7&t=6301
And also PhotoLine UI Icons Customization Project https://www.deviantart.com/shijan/art/825902404

Not sure if it is directly related to your problem, but it looks like a bug in HDR Optimize or during 32-bit file loading. HDR Optimize mapping seems works different in full sized and in mini adjustment window.
Could it be also somehow related to earlier problem in Levels when histogram looks different and Auto Correction works different in full sized and in mini adjustment window?
Here are few examples (i tested yours as well as other HDR and EXR images):
Image
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
User avatar
shijan
Mitglied
Posts: 1604
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: 32bit HDR black point and white point

Post by shijan »

To be honest still i can't understand what exactly you attempt to adjust in your image. Tone Mapping tools discussed earlier usually applied to convert from HDR to normal final SDR image.
32 bit image contents all possible data above and beyond "invisible" range. 3D editors usually auto map that data during render or it should be a slider somewhere there to adjust exposure of HDR image manually.

Another source of the problem could be incorrect transformation from source image to linear gamma. For example if your source was video in Log gamma, you need to transform it to Linear gamma using specially generated 1D LUT (you can generate it using free online LUTCalc app https://cameramanben.github.io/LUTCalc/ ... index.html) or using some Color Space Transform node tool in apps like in DaVinci Resolve.
In addition to gamma you also may need to transform Color Space depending the needs of your workflow.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
Martin Huber
Entwickler
Entwickler
Posts: 4192
Joined: Tue 19 Nov 2002 15:49

Re: 32bit HDR black point and white point

Post by Martin Huber »

I also do not understand exactly what is to be achieved.
Should the sun area, which currently has values around 1 (100%), become brighter? And should the rest keep its brightness?
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

Re: 32bit HDR black point and white point

Post by hdrhelp »

Thank you both. I recognize that I have not made the situation totally clear. IF some of this is too basic please forgive me.
In 3d software an HDR file is used often to light a scene. It contains beyond standard range of tones in brightness or darkness, usually in 32bit. Especially providing an indication of the sun.

Here's a typical HDRI file: https://www.dropbox.com/s/c7uchs1cqulzg ... y.hdr?dl=0
Here's a render with this one: https://www.dropbox.com/s/xiaf8n7czqevr ... n.png?dl=0
Note that the sun produces very obvious, vivid shadows.

Here's my unaltered exported HDR video image (it was saved in Photoline as 32bit exr): https://www.dropbox.com/s/0hyw9gs2l0r88 ... y.exr?dl=0
Here's the render that it produces: https://www.dropbox.com/s/zxwgfj84vb7kx ... e.png?dl=0
as you can tell, it produces light but nearly no shadows.

Here's my HDR video image with the white point of the levels drastically reduced to 50% of the histogram in Photoline: https://www.dropbox.com/s/y687yo1yso8l9 ... y.exr?dl=0
Here's the render that this produces: https://www.dropbox.com/s/1xh381ftxqcjg ... s.png?dl=0
note that this alters the brightness so it is having some effect but the white is definitely not brought up to "maximum" white or something that is likely approaching the indication in the histogram.

Here's my HDR video using the HDR Optimisation setting in Photoline (I pulled white to about 68% and black point up to 5%): https://www.dropbox.com/s/y2y53cxerllxw ... y.hdr?dl=0
And here's the render that this HDR Optimisation produces: https://www.dropbox.com/s/2svxk2pc4zbte ... d.png?dl=0

So, I feel maybe I"m doing something wrong. I think I've followed the recommended methods. Really my concern is not for the shadows but to get the sun to be reallly bright, ideally accurately bright. Also note that if I use the picture info box and hover my cursor over the typical HDRI file, the RGB values go through the roof (understandably), up to 15000 or higher %. And if I do so on the brightest of the corrected ones the RGB indicators in that info box go up to about 150%. So, I am still not effectively setting the white point. Thank you for your help thus far and any further advice that you have.
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

Re: 32bit HDR black point and white point

Post by hdrhelp »

And to clarify, yes @Martin Huber, my goal would be for the sun in my images to be able to go significantly beyond 100%, so that this sun would generate actual shadows with visible contours as in the example HDRI image. That is a good indicator of what I hope to do with the sun brightness value.
User avatar
shijan
Mitglied
Posts: 1604
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: 32bit HDR black point and white point

Post by shijan »

OK, seems i got it.
The main problem is that your EXR image is not a real HDR. It is a SDR image just saved to EXR file with linear gamma. So brightness of the sun don't extend too much to provide strong point light source for 3D render. It produce only soft volume light based on sky and all other parts of the image.

From other side, example "HDRI_abandoned_hopper_terminal_04_1k copy.hdr" that you posted was combined from multiple photos with different exposure. It have extreme sun brightness that became a main point light source.

So in your example you want to add brightness to the sun only. Guess this is how it could work:
- Add Levels
- Right click to Levels layer and add Color Filter
- Create brightness based mask in Color Filter.
- Adjust Levels as you like.

In PhotoLine it is also possible to paint in HDR range.
In Color Editor Enable "Extended Range" checkmark and type any color value beyond 100% (or click to number field with mouse scroll and drag) So you can simply paint a dot instead of sun with any desired color and extended brightness, so it became main light source for your 3D render.

But there is a huge problem - Brushes, Mask Clipping Soft Edges, Layer Styles and 3D Light Effects that always operate in 8-bit, even if applied in 16-bit or 32-bit Document or Layer viewtopic.php?f=1&t=6776
So all your masked area or things painted with brushes that have soft edges became 8-bit and cause banding because it is all in linear gamma.
Same time Color Filter soft edges seems don't have that 8-bit banding problem and works well in high bit depth.

Image

I guess you can also use disabled Optimize HDR to monitor histogram within full 32-bit range. This gives you better visual preview how deep bright sun is:
Image

It is also possible to monitor that "invisible" HDR brightness data using Color Sample tool. It is useful when need to match brightness peak exactly to some other image.
Image
Last edited by shijan on Tue 25 Apr 2023 07:46, edited 8 times in total.
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
User avatar
shijan
Mitglied
Posts: 1604
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: 32bit HDR black point and white point

Post by shijan »

A little bit offtopic, but seems that "HDRI_abandoned_hopper_terminal_04_1k copy.hdr" file have unusual too extreme light spot. Light spot looks way way brighter compare to any real HDR file that i have in my collection. I guess it was artificially modified to work as ultra bright light spot source.
It is literally so bright that Optimize HDR in PhotoLine reads it's maximum brightness as some strange negative value. So it could be bug in that HDR example file itself or in PhotoLine's Optimize HDR.
Image
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
hdrhelp
Mitglied
Posts: 6
Joined: Wed 19 Apr 2023 22:59

Re: 32bit HDR black point and white point

Post by hdrhelp »

Great, I am just able to get back to this now so I haven't tried your method yet @shijan. Will try today.

I downloaded another HDR from the standard site for pre-made ones used in 3d software, https://polyhaven.com/a/derelict_highway_midday
And yes, as we noticed, the white point of the sun is showing 12032000.0 % on the green channel!
Screenshot 2023-04-26 at 11.12.32 AM.png
With the "hopper" one I only got around 15000%. So, definitely the HDR needed to light a scene with good shadows is way far and above what I have.

To reiterate, the HDR that I am working from is from HDR video, it was exported as a single frame from an image sequence. I won't have any blur or painting. What I must do however is process these into full 32bit HDR files with a sun that casts shadows in an action that I apply to each frame in an image sequence. And my hopes to set that sun at white point high enough with PhotoLine levels did not work before. As I say, I will try your method now, just wanted to try to clarify since it seems like I didn't in my earlier posts. Thanks!
You do not have the required permissions to view the files attached to this post.