Page 12 of 24

Re: HDR -> SDR tonemapping

Posted: Mon May 21, 2018 4:53 pm
by admin
Try gamma of 0.40 to 0.42 and report back. Thank you.

gamma= 0.42 is the theoretically correct value. I set a lower one to bring out some black detail but probably set too low.

Re: HDR -> SDR tonemapping

Posted: Mon May 21, 2018 5:01 pm
by dmcs
admin wrote:
Mon May 21, 2018 4:53 pm
Try gamma of 0.40 to 0.42 and report back. Thank you.

gamma= 4.2 is the theoretically correct value. I set a lower one to bring out some black detail but probably set too low.
Typo, I guess?

Re: HDR -> SDR tonemapping

Posted: Mon May 21, 2018 6:53 pm
by admin
For sure. Corrected, thank you. :salute:

Re: HDR -> SDR tonemapping

Posted: Mon May 21, 2018 8:15 pm
by Narkyy
Here's the same frame, gamma at 0.40 and 0.42
It does improve the contrast, though still dim in terms of brightness where light shines.
However the Hable method often results in some scenes brighter than SDR, so it might work better in places.

If I increase light, it only makes the paper overblown and loses detail there (which is already happening at 0.47)

dghdrtosdr(impl="255",light=47,gamma=0.40) Image
dghdrtosdr(impl="255",light=47,gamma=0.42) Image

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 9:01 am
by admin
Honestly, I cannot see the things you claim to see and they seem highly subjective to me in any case. So I'll just add Hable as an option and declare mission accomplished.

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 9:46 am
by Narkyy
Yes sorry it is subjective, otherwise the tonemap is great :salute:

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 10:45 am
by admin
I added Hable:

http://rationalqm.us/misc/DGHDRtoSDR_1.2.rar

Please read the instructions carefully as parameters have changed.
If you'd like to argue for any different Hable default values just speak up.

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 3:54 pm
by dmcs
I've got this weird green thing when using Hable in the latest DGHDRtoSDR_1.2.
hable_065806.png
Gamma mode:
gamma_065806.png
My code for Hable mode:

Code: Select all

DGSource("source.dgi", fulldepth=true)
Crop(0, 280, -0, -280).Spline36Resize(1920, 800)
DGHDRtoSDR(impl="255", light=35, tm="hable")

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:03 pm
by Guest
Set up some samples for version 1.1, but I was a little late, updates are fast.
So here are some images for 1.2
Script is

Code: Select all

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("D:\#test\#hdr\hdr 1.dgi", fieldop=0, fulldepth=True)
LoadPlugin("C:/Program Files (Portable)/AVS Templates/DGHDRtoSDR_1.2/x64/DGHDRtoSDR.dll")
DGHDRtoSDR(impl="255",tm="gamma",light=40,gamma=0.40)
prefetch(16)
Images are resized to 1280x720 at 8 bits
HDRtoSDR 1-1
hdrtosdr 1-1.bmp
SDR 1-1
sdr 1-1.bmp
HDRtoSDR 1-2
hdrtosdr 1-2.bmp
SDR 1-2
sdr 1-2.bmp
HDRtoSDR 1-3
hdrtosdr 1-3.bmp
SDR 1-3
sdr 1-3.bmp
More samples can be quickly obtained if needed/desired

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:06 pm
by admin
dmcs wrote:
Tue May 22, 2018 3:54 pm
I've got this weird green thing when using Hable in the latest DGHDRtoSDR_1.2.
That's weird. Can I get your unprocessed source sample that produces this? I can't make it happen with my samples. Thank you.

EDIT: OK, I have a sample that shows it. It would still be great to get yours. It doesn't fail with impl="sw" for me, BTW. Investigating...

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:09 pm
by admin
Thanks for the testing, gonca!

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:12 pm
by Guest
For comparison
Speed of script is over 128 FPS

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:19 pm
by Guest
admin wrote:
Tue May 22, 2018 4:09 pm
Thanks for the testing, gonca!
The results with gamma look very good to me, might need a dash higher brightness.
But to be honest, no one approach with one set of default settings will be perfect for every source.
Right now we have gamma, Hable, and if the "old" plugin works, Reinhart
It takes very little time to create a script, and index a movie in order to load it into VDub
Then we can adjust settings, or approach, quickly until we get our desired results.
After all, a lot of this is subjective
Set it up to get the results you like

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:30 pm
by admin
dmcs wrote:
Tue May 22, 2018 3:54 pm
I've got this weird green thing when using Hable in the latest DGHDRtoSDR_1.2.
Please re-download and test again. Should be fixed.

Thanks for pointing this out. :salute:

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:53 pm
by dmcs
admin wrote:
Tue May 22, 2018 4:30 pm
Please re-download and test again. Should be fixed.

Thanks for pointing this out. :salute:
Yay!!! So, may I ask what was that? :)

Re: HDR -> SDR tonemapping

Posted: Tue May 22, 2018 4:57 pm
by admin
I forgot to clip the RGB to >= 0 after the Hable step.

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 3:20 pm
by Narkyy
Can the Hable parameters be changed with the new plugin? I'm not sure if I missed something in the readme or not.

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 3:57 pm
by admin
Yes. Use parameters exp, a, b, c, d, e, f, and white.

The document mentions w but it should be white. I'll fix that now.

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 4:13 pm
by Narkyy
Ah yeah, I should've tried more than just w :)
Thanks!

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 5:32 pm
by Guest
Had some time so I ran another test
Same settings and conditions as before

HDRtoSDR2-1
hdrtosdr 2-1.bmp
SDR 2-1
sdr 2-1.bmp
HDRtoSDR 2-2
hdrtosdr 2-2.bmp
SDR 2-2
sdr 2-2.bmp
HDRtoSDR 2-3
hdrtosdr 2-3.bmp
SDR 2-3
sdr 2-3.bmp

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 5:42 pm
by Guest
Same samples with one change in settings

Code: Select all

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("D:\#test\#hdr\hdr 2.dgi", fieldop=0, fulldepth=True)
LoadPlugin("C:/Program Files (Portable)/AVS Templates/DGHDRtoSDR/x64/DGHDRtoSDR.dll")
DGHDRtoSDR(impl="255",tm="gamma",light=45,gamma=0.40)
prefetch(16)
HDRtoSDR 2-1-2
HDRtoSDR 2-1.bmp
HDRtoSDR 2-2-2
HDRtoSDR 2-2.bmp
HDRtoSDR 2-3-2
HDRtoSDR 2-3.bmp

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 5:54 pm
by Narkyy
Noticed the same as I can see in your tests, highlights seem to clip to 235 a bit early with tm="gamma"

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 6:44 pm
by admin
Thank you, gonca! Very useful as always.

What would really help would be suggestions for better default parameters. I've pretty much picked them arbitrarily, so any guidance from these real use cases would be valuable for setting them more appropriately. Ideally, each mode would work pretty fine out of the box, although tweaking may be required for some sources.

On another matter, does anyone have any 12-bit HDR sources? I know they are possible in theory but I haven't seen any in practice.

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 8:08 pm
by Guest
For better default settings would be an easy task, but
I can pick an image and vary one setting at a time but it would require some input from others with suggestions, since this a subjective case

Re: HDR -> SDR tonemapping

Posted: Wed May 23, 2018 8:30 pm
by Guest
Okay, let's start
All samples resized to 1280 x 720 at 8 bits
SDR
sdr 3.bmp
light=40,gamma=0.40
light=40,gamma=0.40.bmp
light=40,gamma=0.45
light=40,gamma=0.45.bmp
light=45,gamma=0.40
light=45,gamma=0.40.bmp
Please feel free to suggest setting tweaks but let us keep it to one change per so we can better see the effects
If a different clip is desired please let me know the criteria, i.e. light colour etc