Jump to: Board index » General » Fusion

What's the correct sRGB workflow in Fusion?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

What's the correct sRGB workflow in Fusion?

PostSun Feb 07, 2016 7:58 pm

Hi,

I've been using Fusion already for a while, and when it comes to working with various image format, I have adapted workflow that I though to be correct one.

As an practical example, I usually mix rendered 16 or 32bit EXR files with regular JPEG stock images in my comps. The workflow that I have used so far is to load EXRs as they are, and view them in viewer using GamutViewLUT that has set source space to no change, and output space to sRGB. This way I was able to view EXRs in correct space.

Then when I brought in JPGs, which showed up with double gamma, as JPGs already have one gamma correction embedded, I usually went to the Import tab, and in the Source Gamma Space rollout, I just clicked remove the curve. I assumed it would just remove the embedded gamma correction and bring my JPG to linear space to play well with the EXR and the viewer.

When it comes to Saver, if I was saving EXRs or any HDR formats, Saver would remain default, where as if i saved JPGs for example, I would set Output Gamma Space type in Export tab to Space, I would choose sRGB gamma space, and I would check apply curve.

Now right up until now, I though this was the official "correct way to do it" workflow.

But just today, I was shocked to discover that most of the color correction nodes, such as ColorCorrector, ColorGain, or BrightnessContrast seem to work better and in a LOT more predictable manner when I actually do not use view LUT set to sRGB, but actually physically apply sRGB right behind the loader using Gamut node. Then for example ColorCorrect seems to be significantly better at tinting shadows/midtones/highlights separately, where as before, using the way I described above, shadows had extreme spread, midtones were kinda mild, and highlights were tinting almost exclusively only 100% white areas. And no matter how long i messed with ranges, it always did not look right.

So this makes me question what really is a correct workflow of handling different image formats when it comes to color spaces in fusion :?:
https://www.artstation.com/rawalanche
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostSun Feb 07, 2016 8:19 pm

Okay, here are some pictures to illustrate the issue even better:

I've used this simple color correction. Shadows go into green, and highlights into purple. Both go about same distance from the center on the ColorWheel:
wheel.PNG
wheel.PNG (75.77 KiB) Viewed 7198 times


This is the result with this color correction I get when I keep image linear but view in viewer through sRGB LUT:
withLUT0000.jpg
withLUT0000.jpg (213.68 KiB) Viewed 7198 times


Now this is the result I get with the very same color correction, when I truly apply the sRGB onto the loader input using Gamut node:
withoutLUT0000.jpg
withoutLUT0000.jpg (214.64 KiB) Viewed 7198 times


Since I moved Highlights and Shadows tint about the same distance, I would expect shadows to turn green and highlights to turn purple evenly, exactly as shown on the second picture. On the fist picture, shadows tint almost the entire image green, where as when it comes to the highlights, there is only very slight purple hue only on the very strong highlights.

How this can be? I always assumed that tools in any 32bit capable compositing package actually expect the output to be linear? Yet from what I am seeing, these tools expect the input to be sRGB. O_o
https://www.artstation.com/rawalanche
Offline
User avatar

Mikhail Korovyansky

  • Posts: 152
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: What's the correct sRGB workflow in Fusion?

PostMon Feb 08, 2016 2:41 am

some description and tips here.
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostMon Feb 08, 2016 9:25 am

Mikhail Korovyansky wrote:some description and tips here.


Thanks

I've carefully read the thread and I agree with most of the points made, however it just points out all the issues I've been running into, without any solution.

Right now, I have to make choice to either work linearly, and have some set of things working while others broken, or I choose to work in sRGB space with gamut applied, which makes other set of things work, but breaks the first one.

I just spent over an hour messing with ColorCorrect node, hoping to tweak ranges somehow to compensate ColorCorrector for linear space, but using ColorCorrector in sRGB space just keeps giving me vastly superior results. There are all kind of weird fringing transitions and odd color shifts when using ColorCorrect in linear space viewed through sRGB LUT, where as in sRGB space, ColorCorrector works amazingly, exactly as if I was editing for example photos in Photoshop.

So I already am aware that the issues are there, what I am asking is how did you guys manage to cope with them. What is the lesser evil solution you ended up using on a daily basis.

Thank you
https://www.artstation.com/rawalanche
Offline
User avatar

Mikhail Korovyansky

  • Posts: 152
  • Joined: Mon Nov 10, 2014 9:59 pm

Re: What's the correct sRGB workflow in Fusion?

PostMon Feb 08, 2016 12:48 pm

Ludvik Koutny wrote:
Mikhail Korovyansky wrote:some description and tips here.


Thanks

I've carefully read the thread and I agree with most of the points made, however it just points out all the issues I've been running into, without any solution.

Right now, I have to make choice to either work linearly, and have some set of things working while others broken, or I choose to work in sRGB space with gamut applied, which makes other set of things work, but breaks the first one.

I just spent over an hour messing with ColorCorrect node, hoping to tweak ranges somehow to compensate ColorCorrector for linear space, but using ColorCorrector in sRGB space just keeps giving me vastly superior results. There are all kind of weird fringing transitions and odd color shifts when using ColorCorrect in linear space viewed through sRGB LUT, where as in sRGB space, ColorCorrector works amazingly, exactly as if I was editing for example photos in Photoshop.

So I already am aware that the issues are there, what I am asking is how did you guys manage to cope with them. What is the lesser evil solution you ended up using on a daily basis.

Thank you


you know, I use the same workflow as yours, actually (with viewport LUT control).. for grading I use already builded macro tools (like Primary Grade from Gringo) or build my own custom tools and macros which works with some gamma tweaks inside..
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostMon Feb 08, 2016 8:45 pm

I've tried Primary Grade but it seems to be no substitute for Color Corrector. It seems to be meant rather for matching foreground to the plate for example, but the UI is very clumsy for freestyle creative color adjustments compared to Fusion's native ColorCorrect. It also seems to be significantly slower :cry:
https://www.artstation.com/rawalanche
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: What's the correct sRGB workflow in Fusion?

PostTue Feb 09, 2016 9:05 pm

the primary grade is a macro, which means it uses many tools under the hood. this is why it renders slower

i think the problem with your example is that you use the "tint", which do different things in the different modes (fast/better/full). if your in "fast" mode its the same as adjusting the gain and i think this is what most other color correction tools do if you the color wheel to adjust the color of an image.
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostTue Feb 09, 2016 10:07 pm

michael vorberg wrote:the primary grade is a macro, which means it uses many tools under the hood. this is why it renders slower

i think the problem with your example is that you use the "tint", which do different things in the different modes (fast/better/full). if your in "fast" mode its the same as adjusting the gain and i think this is what most other color correction tools do if you the color wheel to adjust the color of an image.


I am afraid that's not related to the point I was trying to make. I noticed all the modes (fast/better/full) and all of them work better in sRGB space than they do in Linear space. But compositing in sRGB space is of course a wrong way to do it, almost a crime for some experienced compositing artists.

What confuses me is how is it possible that software, which is primarily intended for linear compositing has one of the most elementary tools, Color Corrector, written in a way it behaves wrong in Linear space, and works correctly only in sRGB space, the one space you should not work in, because it will break many other things (premultiplication for one).

Only workaround I've found so far is to encapsulate each ColorCorrect node inside of two Gamut nodes, first of which will convert input into sRGB, and second of which will put it back into Linear. It's ridiculous workflow though. Definitely nothing I would ever dream of doing in second decade of 21st century :?
https://www.artstation.com/rawalanche
Offline
User avatar

Chad Capeland

  • Posts: 3308
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: What's the correct sRGB workflow in Fusion?

PostTue Feb 09, 2016 11:52 pm

Did you adjust the ranges?
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 8:33 am

Chad Capeland wrote:Did you adjust the ranges?


Yes. I did. I already wrote it in my first post:

And no matter how long i messed with ranges, it always did not look right.


Here's are some examples of things i tried:
Compressed.PNG
Compressed.PNG (36.17 KiB) Viewed 7031 times


I tried to compress the range to bring it down so that both shadows and midtones are lot lower. I also tried to extend the highlights in a way that sort of counters gamma curve. And lastly, I tried to adjust ranges to match Nukes default 0.18 midtones range setup, that Nuke has in its color corrector.

Here are the results:
Comparison.jpg
Comparison.jpg (423.81 KiB) Viewed 7031 times

(right click and "open image in new tab" to see the full res)

Pay special attention to the wall next to top right corner of the wooden door. Leftmost is the reference - Color Correction applied in sRGB space using Gamut node.

Next is extended ranges, as described on the first picture. In the area next to top right corner of the wooden door, you can see where lit area gently falls into the shadow, right on that transition between light and shadow, you can see tones darken a little and tend to oversaturate. It also washes out shadows a little bit, compared to sRGB space reference.

This is even more obvious on the example where i compressed the range, and you can start to really see the kind of fringing that occurs, instead of even linear gradient, you get this significant luminance drop and saturation boost in midtone areas, creating ugly fringing artifacts.

And then there is nuke example, which is just meh... WTF were they thinking? :D

Anyway, those fringing artifacts are EXACTLY kind of artifacts that happen when you apply right math in the wrong space. Exactly the kind of artifacts that linear workflow gets rid of. But unfortunately in this case, for some twisted up reason, CC node inside of Fusion is written to work in sRGB space. So using the only right and correct linear workflow actually breaks the node, instead of making it work right.
https://www.artstation.com/rawalanche
Offline
User avatar

Chad Capeland

  • Posts: 3308
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 3:55 pm

The fringing is caused by the discontinuity in the ranges or from aliasing in the input image. Doesn't imply anything about the wrong math being used. Without seeing your image or comp I can't determine which it is, but it's most likely the discontinuity.

I can say that CC does work in linear space. A test on a more accurate input image will confirm this.

I have a lot of issues with CC, like how the ranges are defined or how the chromaticities are hardcoded, but it is linear.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 4:45 pm

Chad Capeland wrote:The fringing is caused by the discontinuity in the ranges or from aliasing in the input image. Doesn't imply anything about the wrong math being used. Without seeing your image or comp I can't determine which it is, but it's most likely the discontinuity.

I can say that CC does work in linear space. A test on a more accurate input image will confirm this.

I have a lot of issues with CC, like how the ranges are defined or how the chromaticities are hardcoded, but it is linear.


Feel free to make any test image you want :) Or I can provide some if you want. This is one of my old renders. Just JPG that has removed gamma curve in loader. Regardless of what I do, CC seems to behave a lot better in sRGB than in linear.
https://www.artstation.com/rawalanche
Offline
User avatar

Chad Capeland

  • Posts: 3308
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 6:36 pm

Here's a 12 bit one with good coverage of shadows, mids, and highs.

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 4096, },
            Height = Input { Value = 2, },
            PixelAspect = Input { Value = { 1, 256, }, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            Type = Input { Value = FuID { "Horizontal", }, },
            TopRightRed = Input { Value = 1, },
            TopRightGreen = Input { Value = 1, },
            TopRightBlue = Input { Value = 1, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 148.5, }, },
      },
      Gamut1 = GamutConvert {
         PassThrough = true,
         Inputs = {
            OutputSpace = Input { Value = FuID { "sRGB", }, },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 148.5, }, },
      },
      ColorCorrector1 = ColorCorrector {
         CtrlWZoom = false,
         CurrentSettings = 2,
         CustomData = {
            Settings = {
               [1] = {
                  Tools = ordered() {
                     ColorCorrector1 = ColorCorrector {
                        CtrlWZoom = false,
                        CustomData = {
                        },
                        Inputs = {
                           WheelTintAngle2 = Input { Value = 0.33333, },
                           WheelTintLength2 = Input { Value = 1, },
                           WheelTintAngle3 = Input { Value = 0.66666, },
                           WheelTintLength3 = Input { Value = 1, },
                           WheelTintLength4 = Input { Value = 1, },
                           HistogramType = Input { Value = 1, },
                           MasterRGBBrightness = Input { Value = -0.25, },
                           ShadowsRGBBrightness = Input { Value = 1, },
                           MidTonesRGBBrightness = Input { Value = 0.5, },
                           SuppressionAngle1 = Input { Value = 0.0737179, },
                           ColorRanges = Input {
                              Value = ColorCurves {
                                 Curves = {
                                    {
                                       Points = {
                                          { 0, 1, },
                                          { 0.4, 0.2, },
                                          { 0.6, 0, },
                                          { 1, 0, },
                                       },
                                    },
                                    {
                                       Points = {
                                          { 0, 0, },
                                          { 0.4, 0, },
                                          { 0.6, 0.2, },
                                          { 1, 1, },
                                       },
                                    },
                                 },
                              },
                           },
                           HistogramIgnoreTransparent = Input { Value = 1, },
                           Input = Input {
                              SourceOp = "Gamut1",
                              Source = "Output",
                           },
                        },
                        ViewInfo = OperatorInfo { Pos = { 715, 148.5, }, },
                     },
                  },
               },
               [2] = {
                  Tools = ordered() {
                     ColorCorrector1 = ColorCorrector {
                        CtrlWZoom = false,
                        CustomData = {
                        },
                        Inputs = {
                           CorrectionRange = Input { Value = 2, },
                           WheelRangeDummy1 = Input { Value = 2, },
                           TintMode = Input { Value = 0, },
                           ShadowsRGBBrightness = Input { Value = 1, },
                           MidTonesRGBBrightness = Input { Value = 0.5, },
                           SuppressionRangeDummy = Input { Value = 2, },
                           ColorRanges = Input {
                              Value = ColorCurves {
                                 Curves = {
                                    {
                                       Points = {
                                          { 0, 1, },
                                          { 0.4, 0.2, },
                                          { 0.6, 0, },
                                          { 1, 0, },
                                       },
                                    },
                                    {
                                       Points = {
                                          { 0, 0, },
                                          { 0.4, 0, },
                                          { 0.6, 0.2, },
                                          { 1, 1, },
                                       },
                                    },
                                 },
                              },
                           },
                           HistogramIgnoreTransparent = Input { Value = 1, },
                           Input = Input {
                              SourceOp = "Gamut1",
                              Source = "Output",
                           },
                        },
                        ViewInfo = OperatorInfo { Pos = { 715, 148.5, }, },
                        Name = "ColorCorrector1",
                     },
                  },
               },
               [3] = {
                  Tools = ordered() {
                     ColorCorrector1 = ColorCorrector {
                        CtrlWZoom = false,
                        CustomData = {
                        },
                        Inputs = {
                           Menu = Input { Value = 1, },
                           HistogramType = Input { Value = 1, },
                           SuppressionAngle1 = Input { Value = 0.0737179, },
                           ColorRanges = Input {
                              Value = ColorCurves {
                                 Curves = {
                                    {
                                       Points = {
                                          { 0, 1, },
                                          { 0.4, 0.2, },
                                          { 0.6, 0, },
                                          { 1, 0, },
                                       },
                                    },
                                    {
                                       Points = {
                                          { 0, 0, },
                                          { 0.4, 0, },
                                          { 0.6, 0.2, },
                                          { 1, 1, },
                                       },
                                    },
                                 },
                              },
                           },
                           HistogramIgnoreTransparent = Input { Value = 1, },
                           Input = Input {
                              SourceOp = "Gamut1",
                              Source = "Output",
                           },
                        },
                        ViewInfo = OperatorInfo { Pos = { 715, 148.5, }, },
                     },
                  },
               },
            },
         },
         Inputs = {
            CorrectionRange = Input { Value = 2, },
            WheelRangeDummy1 = Input { Value = 2, },
            TintMode = Input { Value = 0, },
            ShadowsRGBBrightness = Input { Value = 1, },
            MidTonesRGBBrightness = Input { Value = 0.5, },
            SuppressionRangeDummy = Input { Value = 2, },
            ColorRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1, },
                           { 0.4, 0.2, },
                           { 0.6, 0, },
                           { 1, 0, },
                        },
                     },
                     {
                        Points = {
                           { 0, 0, },
                           { 0.4, 0, },
                           { 0.6, 0.2, },
                           { 1, 1, },
                        },
                     },
                  },
               },
            },
            HistogramIgnoreTransparent = Input { Value = 1, },
            Input = Input {
               SourceOp = "Gamut1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 148.5, }, },
      },
      Gamut1_1 = GamutConvert {
         PassThrough = true,
         Inputs = {
            SourceSpace = Input { Value = FuID { "sRGB", }, },
            Input = Input {
               SourceOp = "ColorCorrector1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 148.5, }, },
      },
   },
}
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 6:55 pm

Chad Capeland wrote:Here's a 12 bit one with good coverage of shadows, mids, and highs.



I am sorry but I have no idea what I am looking at. What exactly am I supposed to do with it? And are those two gamut nodes are supposed to be disabled? Because right now, I don't see any difference, there is just background gradient fed into CC encapsulated in gamut nodes. :?:
https://www.artstation.com/rawalanche
Offline

Ludvik Koutny

  • Posts: 97
  • Joined: Mon Nov 10, 2014 10:52 am

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 7:09 pm

Nevermind, figured it out. It shows on the gradient that midtones are indeed in the very center of gradient when viewing through LUT and working linearly. I was obviously wrong.

But it still doesn't change much on the point I am afraid. If I take regular linear gradient and view it in sRGB, then what's perceived as mid 50% gray by human eye is definitely not in the center of that gradient, but rather far on the side. So I guess when i try to color correct an image, what fusion's CC node sees as shadows in linear space, I see as pretty much 90% of luminance range in my eyes, and midtones and highlights are squeezed into those remaining 10%.
https://www.artstation.com/rawalanche
Offline
User avatar

Chad Capeland

  • Posts: 3308
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: What's the correct sRGB workflow in Fusion?

PostWed Feb 10, 2016 8:50 pm

So you have a linear image, fed into a linear CC, and you're viewing it in sRGB and wondering why the midpoint is different? It's not surprising that it doesn't match.

The expectation is that the midpoint would be scaled, but the CC tool doesn't know what you're doing to the image AFTER it renders. It shouldn't, really.

The real issue is that CC's ranges don't make it intuitive enough to compensate for that, though. For instance, if the ranges could be a separate image input, you'd have much better control. As it is now, it's a black box with only a few control points.

Heck, it gets even weirder if your image isn't 0-1. CC doesn't deal well with that at all, again because of the ranges controls.
Chad Capeland
Indicated, LLC
www.floweffects.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 29 guests