Author Topic: LUT clamps the image  (Read 10080 times)

2016-10-18, 17:59:47

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
As title :- ). But unnecessary and not wanted. See illustration

VFB+ provides same look with same LUT, but doesn't clamp the image, retains full dynamic range for post-production ( including white-balance which required dynamic range to work properly).

[img height=1024 width=640 ]https://forum.corona-renderer.com/index.php?action=dlattach;topic=13515.0;attach=53554;image[/img]

Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-10-18, 18:12:04
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
I thought LUTs would always clamp - great to see it's not the case, already looking forward to a fix.

2016-10-18, 18:13:44
Reply #2

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
LUT is mapping from 0-1 to 0-1. So what happens over 1 is undefined - it is a tool of different trade (film). We can make values > 1 unaffected by LUT instead of clamping them, similar to contrast... if that is the desired solution
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-10-18, 18:27:00
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Yup LUT remaps within 0-1, but it doesn't mean it must clip everything out of that range :- ). As you see it works perfectly and I used that workflow for whole year on many projects with VFB+.

I have to see what DavinciResolve or something similar does but those LogC files also have dynamic range that I believe are preserved when the whole file is shifted.
And I know some game engines are actually using dense LUTs to do tonemapping. Not even sure how that works but somehow it's possible.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-10-18, 19:03:10
Reply #4

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
hmm... what about when LUT maps white (255 255 255) to RGB 0 127 256? What should happen in that case with overbrights, such as RGB 2.0 2.0 2.0?
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-10-18, 19:12:14
Reply #5

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
I honestly don't know straight out of head what happens, but it did work perfectly in all cases I had.

I'll try some theoretical scenarios, like one you mention, or applying LUT to fully over-blown render and taking it back to average exposure.

Edit: Photoshop clamps it. Vray doesn't bake LUT (neither plans on). Imho could depend on LUT, as you proposed, ignore above 1. If the LUT pushes value up, retain dynamic range by  ignoring it. If it lowers it than I guess it would clamp the whole range.
« Last Edit: 2016-10-18, 19:27:41 by Juraj_Talcik »
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-10-19, 12:46:29
Reply #6

Dionysios.TS

  • Active Users
  • **
  • Posts: 766
    • View Profile
    • Evolvia Imaging
Interesting stuff!

2016-10-19, 13:48:11
Reply #7

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
hmm... what about when LUT maps white (255 255 255) to RGB 0 127 256? What should happen in that case with overbrights, such as RGB 2.0 2.0 2.0?

I guess it's too much to ask for extrapolating the expected values for values beyond 1, is this possible at all? I wonder how Rotem did handle overbrights for his VFB+.

Juraj, could you test with VFB+ what happens for values like rgb 2/2/2 with a LUT that visibly introduces a red or blue tint for example? Do values beyond 1 change accordingly or are they left untouched?

2016-10-19, 13:56:45
Reply #8

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
I also toyed with some idea of shifting the values outside the range, basically how levels/curves would do. Because LUT can be holder of such information, but yeah, it can do also anything else.

Will try some when I get time, I mostly used LUTs that boost midtones and introduce a lot of contrast.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-10-20, 07:47:39
Reply #9

Rotem

  • Active Users
  • **
  • Posts: 64
    • View Profile
VFB+ extrapolates for values outside of 0-1.

2016-10-20, 16:24:06
Reply #10

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
VFB+ extrapolates for values outside of 0-1.
Thanks, Rotem. So, it's doable...

2016-10-20, 16:45:34
Reply #11

Dionysios.TS

  • Active Users
  • **
  • Posts: 766
    • View Profile
    • Evolvia Imaging
Good to know! ;-)

2016-10-21, 14:44:40
Reply #12

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
now when you say extrapolate, do you mean just going with 45deg slope in overbrights, just shifted by the last value in LUT, or going with the same slope as the last segment of LUT?
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-10-21, 15:26:07
Reply #13

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
now when you say extrapolate, do you mean just going with 45deg slope in overbrights, just shifted by the last value in LUT, or going with the same slope as the last segment of LUT?
I'm no expert by no means but maintaining the slope is probably the better approach.

2016-10-21, 15:30:10
Reply #14

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Curious for answer too but I guess the non-linear extrapolation could lead to some nuclear results :- )
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!