Author Topic: Tonemapping Order/Behaviour  (Read 16456 times)

2023-08-07, 17:11:25
Reply #15

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13727
  • Marcin
    • View Profile
Hopefully this is an easy way to explain what is going on and hopefully I got it right. :)

first strip is RGB 0 to 1
second one is 0 to 100
third one is 0 to 500 000

If we only consider the ACES OT operator:
1) When it's disabled, you get a full HDR image. RGB values can exceed 1 and go super high.
2) When it's enabled, nothing can be brighter than RGB 1

If you move the Tone Curve (or pretty much any) operator above or below the ACES OT operator, you are basically applying the same operator to a different image.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-08-07, 17:17:18
Reply #16

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
Ok we get that bit, but which is the 'correct' way.  Everything I read says keep ACES OT as the bottom of the stack.  But in that particular scene my Tone Curve operator was behaving in complete opposite ways depending on whether it was above or below.  Surely that's not right despite them being different images.

Are all of the operators designed to be used above ACES OT in the stack?

I'll reproduce it and send the scene.

Either way I strongly suspect it was the dodgy curves operator that screwed that scene up

2023-08-08, 11:02:05
Reply #17

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
I've just created a support ticket with a scene file attached.

2023-08-08, 11:13:44
Reply #18

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
And here's a screen recording

2023-08-08, 12:00:08
Reply #19

piotrus3333

  • Active Users
  • **
  • Posts: 302
    • View Profile
to quickly visualise what operators do to colours use 32 bit gradient (0 - 2 float is probably enough to see the important parts) processed with CIE and displace modifier in 3ds max on a plane:
Marcin Piotrowski
youtube
CGI OCIO config 04

2023-08-08, 17:49:47
Reply #20

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13727
  • Marcin
    • View Profile
Ok we get that bit, but which is the 'correct' way.  Everything I read says keep ACES OT as the bottom of the stack.  But in that particular scene my Tone Curve operator was behaving in complete opposite ways depending on whether it was above or below.  Surely that's not right despite them being different images.

Are all of the operators designed to be used above ACES OT in the stack?

I'll reproduce it and send the scene.

Either way I strongly suspect it was the dodgy curves operator that screwed that scene up


If you put any operator ABOVE Aces OT - you are applying it to this image (i.e. a huge range of RGB values) - https://forum.corona-renderer.com/index.php?action=dlattach;topic=40616.0;attach=186553;image

If you put any operator BELOW Aces OT - you are applying it to this image (i.e. a "flat" image clamped to 0-1 range only) - https://forum.corona-renderer.com/index.php?action=dlattach;topic=40616.0;attach=186555;image

So it is expected that you will get completely different results.

You can use whatever order you prefer, but I would say that putting ACES OT as the last one in the stack is more correct. This way you make some adjustments to your full high dynamic range image, and clamp it to 0-1 range as the last step.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-08-08, 18:30:23
Reply #21

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
Marcin - did you watch the video?

I'm not questioning what you're saying at all.  I fully appreciate and understand that.  But I would have thought that increasing the highlights value in the Tone Curve operator to a positive number would make the highlights brighter regardless of whether it was on a clamped or unclamped image.

And it's exactly when the tone curve operator is above ACES OT that I'm having issues.  As you can see in the screen recording and the screenshots in the very first post.  When I have the Tone Curve above ACES OT, using minus value increases the highlights and using positive values decreases the highlights.

Surely that isn't right at a fundamental common sense level of understanding.

It's basically doing the opposite of what you're telling me it should be doing.  Even the tooltip in the VFB verifies this.  Postive values make highlights brighter etc

It doesn't behave this way if I place it below ACES OT, it behaves as expected, albeit on a now clamped image.

2023-08-08, 19:04:40
Reply #22

piotrus3333

  • Active Users
  • **
  • Posts: 302
    • View Profile
Marcin - did you watch the video?

I'm not questioning what you're saying at all.  I fully appreciate and understand that.  But I would have thought that increasing the highlights value in the Tone Curve operator to a positive number would make the highlights brighter regardless of whether it was on a clamped or unclamped image.

And it's exactly when the tone curve operator is above ACES OT that I'm having issues.  As you can see in the screen recording and the screenshots in the very first post.  When I have the Tone Curve above ACES OT, using minus value increases the highlights and using positive values decreases the highlights.

Surely that isn't right at a fundamental common sense level of understanding.

It's basically doing the opposite of what you're telling me it should be doing.  Even the tooltip in the VFB verifies this.  Postive values make highlights brighter etc

It doesn't behave this way if I place it below ACES OT, it behaves as expected, albeit on a now clamped image.

no, I did not watched the video as I checked and showed with a graph few post ago what Tone Curve exactly does. ploted curve tells me more.
Tone Curve is only usable on tone mapped image: when it adjusts highlights it does so only to a range of ~0.6 - 1.0 float with a pivot placed at 1,1 (x,y). Pivot at this point means that suppressing the highlights to -1 with Highlights spinner in Tone Curve (at ~0.8) results in values above 1.0 float to increase substantially. Hence your issues with using Tone Curve above ACES OT.

Marcin Piotrowski
youtube
CGI OCIO config 04

2023-08-08, 19:07:21
Reply #23

piotrus3333

  • Active Users
  • **
  • Posts: 302
    • View Profile
It doesn't behave this way if I place it below ACES OT, it behaves as expected, albeit on a now clamped image.

on a tone mapped image, not clamped image. clamping would be cutting or truncating values.
Marcin Piotrowski
youtube
CGI OCIO config 04

2023-08-08, 19:12:18
Reply #24

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
Marcin - did you watch the video?

I'm not questioning what you're saying at all.  I fully appreciate and understand that.  But I would have thought that increasing the highlights value in the Tone Curve operator to a positive number would make the highlights brighter regardless of whether it was on a clamped or unclamped image.

And it's exactly when the tone curve operator is above ACES OT that I'm having issues.  As you can see in the screen recording and the screenshots in the very first post.  When I have the Tone Curve above ACES OT, using minus value increases the highlights and using positive values decreases the highlights.

Surely that isn't right at a fundamental common sense level of understanding.

It's basically doing the opposite of what you're telling me it should be doing.  Even the tooltip in the VFB verifies this.  Postive values make highlights brighter etc

It doesn't behave this way if I place it below ACES OT, it behaves as expected, albeit on a now clamped image.

no, I did not watched the video as I checked and showed with a graph few post ago what Tone Curve exactly does. ploted curve tells me more.
Tone Curve is only usable on tone mapped image: when it adjusts highlights it does so only to a range of ~0.6 - 1.0 float with a pivot placed at 1,1 (x,y). Pivot at this point means that suppressing the highlights to -1 with Highlights spinner in Tone Curve (at ~0.8) results in values above 1.0 float to increase substantially. Hence your issues with using Tone Curve above ACES OT.

I meant Maru (also called Marcin)

2023-08-08, 19:18:49
Reply #25

piotrus3333

  • Active Users
  • **
  • Posts: 302
    • View Profile
heh.
anyway, does it clear things out?
Marcin Piotrowski
youtube
CGI OCIO config 04

2023-08-08, 20:19:40
Reply #26

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
Sure, you're effectively confirming what I'm saying/experiencing.  But Maru is effectively saying the opposite.

You're saying Tone Curve is only usable on a tone mapped image.  So below ACES OT in the stack.

Maru has said the most correct way would be to use it above ACES OT, so before tonemapping.

The tooltip just confuses things further by not specifiying either way and the tooltip basically says positive values will make highlights brighter etc - but as I've found out and you've proved, it only works that way if placed below the ACES OT in the stack.

So this is ultimately why I asked for confirmation.  We've got the people who make the software saying one thing, and the users saying another.

Also for what it's worth, I do expect different results from the Tone Curve dependant on whether it's above or below ACES OT.  I've understood that from day one.  My issue wasn't necessarily with suppressing highlights either.  In fact the exact opposite, I want to bring them back.  Increase them.  But you can't increase the highlights with tone curve operator when it's placed above ACES OT, it does the opposite.  It decreases them.  It completely flattens them.  When placed above ACES OT in the stack.  Positive highlight numbers in the tone curve operator progressively suppresses the highlights.

Also if what I'm experiencing is correct, and what you're saying is correct, then the tooltip should explicitly state that it only works as described when placed below ACES OT in the stack.

2023-08-09, 13:18:15
Reply #27

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13727
  • Marcin
    • View Profile
I think we are dealing with a very simple issue here, but it's tricky to explain. I will do my best to get a proper, easy to understand answer here.

Sorry for the confusion and it seems that it would be also great to update our help guides once we have the final results!
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-08-09, 13:32:07
Reply #28

pokoy

  • Active Users
  • **
  • Posts: 1988
    • View Profile
From my personal experience, a few operators just don't work well when used before ACES operator (or Reinhard/filmic tone mapping prior to availability of ACES):
- Tone Curve - results are not consistent (probably due to the 'response curve' of ACES acting differently on different brightness levels)
- Contrast - same
- LUT - same
- Saturation - this one has been wonky since day 1, it's way too aggressive but seems to behave slightly better after ACES

The only ones that I use before ACES are the obvious ones - Exposure, White Balance, Gree/Magenta Tint. Sometimes, I'll use Highlight Compression before ACES to increase/reduce highlights (this one is meant to work on HDR input after all).

I don't follow the 'Keep ACES always the last in the chain' rule because it just doesn't look good for some operators. Rules exist to be broken :D Also, I'm pretty sure some are definitely NOT meant to be used before ACES, like LUT.

2023-08-09, 13:59:52
Reply #29

dj_buckley

  • Active Users
  • **
  • Posts: 1060
    • View Profile
I think we are dealing with a very simple issue here, but it's tricky to explain. I will do my best to get a proper, easy to understand answer here.

Sorry for the confusion and it seems that it would be also great to update our help guides once we have the final results!

Correct, it's very simple.  You said the most correct way to use Tone Curve is above ACES.  The tooltip for highlights in the tone curve operator states 'positive values enhance them, negative values suppress them' - but when I place Tone Curve above ACES OT and use a positive value for highlights it suppresses them, if I use a negative value it enhances them.  It's that simple.

The video I posted clearly demonstrates this.