Page 1 of 1

Tone Mapping Method descriptions

PostPosted: Fri Nov 29, 2024 8:46 am
by hansjelles
Hi, I’m looking for a clear description of what each selection in the Tone Mapping Method of a Color Space Transform does. Is this documented anywhere? For example, the default value is set to "DaVinci." What happens to colors within the gamut of the target color space, and what happens to colors that are out of gamut?

Re: Tone Mapping Method descriptions

PostPosted: Fri Nov 29, 2024 9:59 am
by Mads Johansen
Have you read chapter 9 and chapter 154 in the August 2024 manual?

Re: Tone Mapping Method descriptions

PostPosted: Fri Nov 29, 2024 11:31 am
by hansjelles
Mads Johansen wrote:Have you read chapter 9 and chapter 154 in the August 2024 manual?

Thank you for your reply. Yes, I read that, but I’m looking for a description that helps users understand what happens to the image they see in front of them. Let me give you two examples of how I think it works (correct me if I am wrong).

The "Clip" option does the following: all pixels/colors that are within the output gamut are left unchanged. Any pixels/colors outside the gamut are moved to the edge of the gamut. The result of this is that those colors lose their detail and flatten into a single color. (In my example, the brush strokes in the bright red artwork become less visible, turning into a solid red, but the skin tone and whites remain unchanged.)

The second example, when you choose the "Luminance Mapping" option, is that all pixels/colors are brought within the output gamut. The extreme pixel/color values are adjusted to fit into the output gamut. This adjustment percentage is also applied to the colors that are already within the gamut, so they change as well. (In my example, the brush strokes in the bright red artwork remain visible, but the red color becomes less saturated because it no longer fits within the gamut. However, the skin tone, which was already within the gamut, is also adjusted, becoming slightly less saturated. This means both the skin tone and the whites are affected.)

Re: Tone Mapping Method descriptions

PostPosted: Sat Nov 30, 2024 8:44 am
by Mads Johansen
Yes, that is correct.

In the images you posted, you are aware that you changed the output color space between the first and second, right? That makes them difficult to compare.

Do note that the Color Space Transform OFX node only starts with the timeline color space (see Image Processing Order of Operations on page 3201), that means that if the timeline is in YRGB rec.709 the color is converted (I just realized I have no idea how) to rec.709 then to the output color then to timeline color for Delivery.
I sidestep that entire problem by having a Resolve Color Managed timeline with Wide Gamut Intermediate timeline and whatever output color space I need (usually rec.2100 HLG).

Re: Tone Mapping Method descriptions

PostPosted: Sat Nov 30, 2024 12:18 pm
by KrunoSmithy
As Johansen mentioned. Description can be found in the manual.

Tone Mapping Method lets you enable tone mapping to accommodate workflows where you need
to transform one color space into another with a dramatically larger or smaller dynamic range by automating an expansion or contraction of image contrast in such a way as to give a pleasing result with no clipping.

— None: This setting disables Input DRT Tone Mapping. No tone mapping is applied to the Input
to Timeline Color Space conversion at all, resulting in a simple 1:1 mapping to the Timeline
Color Space.

— Clip: Hard clips all out-of-bounds values.

— Simple: Uses a simple curve to perform this transformation, compressing or expanding the highlights and/or shadows of the timeline dynamic range to better fit the output dynamic range. Note that the “Simple” option maps between approximately 5500 nits and 100 nits, so if you’re mapping from an HDR source with more than 5500 nits to an SDR destination there may still be some clipping of the highlights above 5500 nits.

— Luminance Mapping: Same as DaVinci, but more accurate when the Input Color Space of all your media is in a single standards-based color space, such as Rec. 709 or Rec. 2020.

— DaVinci: This option tone maps the transform with a smooth luminance roll-off in the shadows and highlights, and controlled desaturation of image values in the very brightest and darkest parts of the image. This setting is particularly useful for wide-gamut camera media and is a good setting to use when mixing media from different cameras.

.......................................

These options are really just a matter of relativity and convenience. They are not color grading tools per se, just few convenient sliders in the same node. They are not meant to replace a set of other grading tools or decisions made by colorist. In that sense they are both relative to the context of what you are doing and optional since there are other tools that can do the job. And there is a matter of where in the pipeline the tool is used or where in the node tree it is used. You could have CST applied in edit page, fusion page, color page, multiple times, plus all the other tools, and for different assets on the timeline and or fusion. Sometimes you want and sometimes you don't want tone mapping. Only in the most simplistic cases would you use CST once with those options and never look back. That is not always the case, so we are given lot of flexibility. The examples you posted should't be used to asses tone making options of CST tool, because of those reasons.

I've given a link in another thread where you asked a question about out of gamut colors.

viewtopic.php?f=21&t=212651

https://juanmelara.com.au/blog/fixing-o ... in-resolve

As you can see from these two example bellow: CST node or nodes and tone mapping is just one small part of a much larger process of grading, so what they do is useful to know, but its not set it and forget it tool for finish grade. Depending on your source and output, and personal workflow, CST is just one tool in the toolbox. Here are ways how it might be incorporated into more complex workflows as demonstrated by colorists Juan Melara in these videos.

Insider Knowledge - An easier way to grade log footage



The Kodak 2383 LUT rebuilt as a Resolve PowerGrade


Re: Tone Mapping Method descriptions

PostPosted: Sat Nov 30, 2024 8:01 pm
by hansjelles
Mads Johansen wrote:Yes, that is correct.

In the images you posted, you are aware that you changed the output color space between the first and second, right? That makes them difficult to compare.

Do note that the Color Space Transform OFX node only starts with the timeline color space (see Image Processing Order of Operations on page 3201), that means that if the timeline is in YRGB rec.709 the color is converted (I just realized I have no idea how) to rec.709 then to the output color then to timeline color for Delivery.
I sidestep that entire problem by having a Resolve Color Managed timeline with Wide Gamut Intermediate timeline and whatever output color space I need (usually rec.2100 HLG).



Thanks, Mad, you’re absolutely right that the output color choices in screenshot 1 and 2 are not the same. The reason for this was just to show that the image I’m working with is extremely red and therefore needs to be converted in a certain way. The screenshots are never fully accurate because they were also converted to sRGB JPEGs to be able to post them.

As you’ve pointed out, the first conversion of your source material into your project workspace is very important. Your timeline workspace is crucial here (which you define in your project settings). As you mentioned, I also always choose the Resolve Color Managed timeline and work with that. However, I’m starting to think that for many different shots that need to be edited, it might be better to switch to a CST node tree where I can adjust the settings for each shot individually.

Re: Tone Mapping Method descriptions

PostPosted: Sat Nov 30, 2024 8:37 pm
by hansjelles
KrunoSmithy wrote:As Johansen mentioned. Description can be found in the manual.

Tone Mapping Method lets you enable tone mapping to accommodate workflows where you need
to transform one color space into another with a dramatically larger or smaller dynamic range by automating an expansion or contraction of image contrast in such a way as to give a pleasing result with no clipping.

— None: This setting disables Input DRT Tone Mapping. No tone mapping is applied to the Input
to Timeline Color Space conversion at all, resulting in a simple 1:1 mapping to the Timeline
Color Space.

— Clip: Hard clips all out-of-bounds values.

— Simple: Uses a simple curve to perform this transformation, compressing or expanding the highlights and/or shadows of the timeline dynamic range to better fit the output dynamic range. Note that the “Simple” option maps between approximately 5500 nits and 100 nits, so if you’re mapping from an HDR source with more than 5500 nits to an SDR destination there may still be some clipping of the highlights above 5500 nits.

— Luminance Mapping: Same as DaVinci, but more accurate when the Input Color Space of all your media is in a single standards-based color space, such as Rec. 709 or Rec. 2020.

— DaVinci: This option tone maps the transform with a smooth luminance roll-off in the shadows and highlights, and controlled desaturation of image values in the very brightest and darkest parts of the image. This setting is particularly useful for wide-gamut camera media and is a good setting to use when mixing media from different cameras.

.......................................

These options are really just a matter of relativity and convenience. They are not color grading tools per se, just few convenient sliders in the same node. They are not meant to replace a set of other grading tools or decisions made by colorist. In that sense they are both relative to the context of what you are doing and optional since there are other tools that can do the job. And there is a matter of where in the pipeline the tool is used or where in the node tree it is used. You could have CST applied in edit page, fusion page, color page, multiple times, plus all the other tools, and for different assets on the timeline and or fusion. Sometimes you want and sometimes you don't want tone mapping. Only in the most simplistic cases would you use CST once with those options and never look back. That is not always the case, so we are given lot of flexibility. The examples you posted should't be used to asses tone making options of CST tool, because of those reasons.

I've given a link in another thread where you asked a question about out of gamut colors.

viewtopic.php?f=21&t=212651

https://juanmelara.com.au/blog/fixing-o ... in-resolve

As you can see from these two example bellow: CST node or nodes and tone mapping is just one small part of a much larger process of grading, so what they do is useful to know, but its not set it and forget it tool for finish grade. Depending on your source and output, and personal workflow, CST is just one tool in the toolbox. Here are ways how it might be incorporated into more complex workflows as demonstrated by colorists Juan Melara in these videos.

Insider Knowledge - An easier way to grade log footage



The Kodak 2383 LUT rebuilt as a Resolve PowerGrade



Thanks, Kruno, for your detailed answer to my question, it’s greatly appreciated. Unfortunately, in the small film projects I work on, I don’t always have the budget to hire a colorist, which would definitely improve the final result. So, I’m trying to learn more about it myself, and your information helps a lot with that. I’ll get to work on it.