Jump to: Board index » General » Fusion

Automatic Exposure

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

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Automatic Exposure

PostSun Mar 01, 2020 8:40 pm

Hi guys, I found a very cool tutorial from Vito on how to control the exposure via expressions. here's the link to it:

It works perfectly on 9 but on 16 it doesn't. I think it's a code problem but my knowledge is scarce in that matter, could you check if the expression work for 16 please? Here's the expression: ProbeMe:GetValue("TopLeftRed",time)/ProbeMe:GetValue("TopLeftRed",0)
Last edited by Jimmy Paez on Mon Mar 02, 2020 12:12 am, edited 1 time in total.
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostSun Mar 01, 2020 11:41 pm

Yes, that works.

When you say Fu16, is that Standalone or the Fusion tab in Resolve?

If in Resolve, check your timeline. You're wanting to sample from time=0 in that expression which may lie outside the valid range of your comp.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 12:18 am

Thanks for your help, It doesn't work in the standalone version.
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostMon Mar 02, 2020 1:08 am

In that case, is your value for TopLeftRed at time=0 equal to 0?

If so, the expression will fail because you're trying to divide by zero.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 1:24 am

It's pretty confusing to me, I've created a comp that works in 9 but it doesn't on 16 I just want to know why. The math is not supposed to change.
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostMon Mar 02, 2020 2:17 am

You already established that in your opening post :)

If it's none of the above I'd recommend you post your setup, I'm happy to take a look.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 3:03 am

Thanks for your help, here's the comp:
Code: Select all
{
   Tools = ordered() {
      ColorGain1 = ColorGain {
         Inputs = {
            GainRed = Input {
               Value = 0.254722166666292,
               Expression = "ProbeMe:GetValue(\"TopLeftRed\",time)/ProbeMe:GetValue(\"TopLeftRed\",0)",
            },
            GainGreen = Input {
               Value = 0.254273390930913,
               Expression = "ProbeMe:GetValue(\"TopLeftGreen\",time)/ProbeMe:GetValue(\"TopLeftGreen\",0)",
            },
            GainBlue = Input {
               Value = 0.494382563787378,
               Expression = "ProbeMe:GetValue(\"TopLeftBlue\",time)/ProbeMe:GetValue(\"TopLeftBlue\",0)",
            },
            ColorRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1 },
                           { 0.125, 0.75 },
                           { 0.375, 0.25 },
                           { 0.5, 0 }
                        }
                     },
                     {
                        Points = {
                           { 0.5, 0 },
                           { 0.625, 0.25 },
                           { 0.875, 0.75 },
                           { 1, 1 }
                        }
                     }
                  }
               },
            },
            Input = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 712, 96 } },
      },
      Loader1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "C:\\Users\\Jim\\Desktop\\Test.png",
               FormatID = "PNGFormat",
               StartFrame = -1,
               LengthSetManually = true,
               TrimIn = 0,
               TrimOut = 0,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 0,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 0
            }
         },
         Inputs = {
            ["Clip1.PNGFormat.PostMultiply"] = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 407.087, -41.2394 } },
      },
      Loader2 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "G:\\Projects\\Anthony\\Footage\\Final\\Final0000.jpg",
               FormatID = "JpegFormat",
               Length = 4557,
               LengthSetManually = true,
               TrimIn = 3848,
               TrimOut = 4556,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 1,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 708
            }
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 323.383, 169.55 } },
      },
      ColorGain2 = ColorGain {
         Inputs = {
            LockRGB = Input { Value = 1, },
            GainRed = Input {
               SourceOp = "ColorGain2Gain",
               Source = "Value",
            },
            ColorRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1 },
                           { 0.125, 0.75 },
                           { 0.375, 0.25 },
                           { 0.5, 0 }
                        }
                     },
                     {
                        Points = {
                           { 0.5, 0 },
                           { 0.625, 0.25 },
                           { 0.875, 0.75 },
                           { 1, 1 }
                        }
                     }
                  }
               },
            },
            Input = Input {
               SourceOp = "Loader2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 503.787, 188.452 } },
      },
      ColorGain2Gain = BezierSpline {
         SplineColor = { Red = 104, Green = 144, Blue = 233 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 5, 0.33 }, Flags = { Linear = true, Loop = true } },
            [15] = { 0.989999999999999, LH = { 10, 0.659999999999999 }, Flags = { Linear = true, Loop = true } }
         }
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "ColorGain2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "ColorGain1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 710.667, 181.303 } },
      },
      ProbeMe = Background {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 4556, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "ProbeP",
               Source = "Result",
            },
            TopLeftGreen = Input {
               SourceOp = "ProbeP",
               Source = "Green",
            },
            TopLeftBlue = Input {
               SourceOp = "ProbeP",
               Source = "Blue",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 863.642, 197.486 } },
      },
      ProbeP = Probe {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            ImageToProbe = Input {
               SourceOp = "Loader2",
               Source = "Output",
            },
            Position = Input { Value = { 0.864723434577358, 0.911799202439597 }, },
            ProbeRectangle = Input { Value = 1, },
            Width = Input { Value = 0.0571197411003237, },
            Height = Input { Value = 0.0683908045977011, },
         },
      }
   },
   ActiveTool = "ProbeMe"
}
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostMon Mar 02, 2020 4:40 am

I can't see your input frames, obviously. But if the Probe returns 0 on any of those channels the expression would fail...

Does this one work for you? It won't demonstrate Vito's process this way, but it uses the same expression.

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "Shake1",
               Source = "X",
            },
            TopLeftGreen = Input {
               SourceOp = "Shake2",
               Source = "X",
            },
            TopLeftBlue = Input {
               SourceOp = "Shake3",
               Source = "X",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 82.5 } },
      },
      Shake1 = Shake {
         CtrlWZoom = false,
         Inputs = {
            RandomSeed = Input { Value = 1639, },
            XMinimum = Input { Value = 0.043, },
         },
      },
      Shake2 = Shake {
         CtrlWZoom = false,
         Inputs = {
            XMinimum = Input { Value = 0.282, },
         },
      },
      Shake3 = Shake {
         CtrlWZoom = false,
         Inputs = {
            RandomSeed = Input { Value = 16889, },
            XMinimum = Input { Value = 0.103, },
         },
      },
      ProbeMe = Background {
         NameSet = true,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "ProbeP",
               Source = "Result",
            },
            TopLeftGreen = Input {
               SourceOp = "ProbeP",
               Source = "Green",
            },
            TopLeftBlue = Input {
               SourceOp = "ProbeP",
               Source = "Blue",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 214.5 } },
      },
      ProbeP = Probe {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            ImageToProbe = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Position = Input { Value = { 0.864723434577358, 0.911799202439597 }, },
            ProbeRectangle = Input { Value = 1, },
            Width = Input { Value = 0.0571197411003237, },
            Height = Input { Value = 0.0683908045977011, },
         },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "ColorGain2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "ColorGain1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 148.5 } },
      },
      ColorGain1 = ColorGain {
         Inputs = {
            GainRed = Input {
               Value = 1.53922252534273,
               Expression = "ProbeMe:GetValue(\"TopLeftRed\",time)/ProbeMe:GetValue(\"TopLeftRed\",0)",
            },
            GainGreen = Input {
               Value = 1.28392641121888,
               Expression = "ProbeMe:GetValue(\"TopLeftGreen\",time)/ProbeMe:GetValue(\"TopLeftGreen\",0)",
            },
            GainBlue = Input {
               Value = 0.846561702234623,
               Expression = "ProbeMe:GetValue(\"TopLeftBlue\",time)/ProbeMe:GetValue(\"TopLeftBlue\",0)",
            },
            ColorRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1 },
                           { 0.125, 0.75 },
                           { 0.375, 0.25 },
                           { 0.5, 0 }
                        }
                     },
                     {
                        Points = {
                           { 0.5, 0 },
                           { 0.625, 0.25 },
                           { 0.875, 0.75 },
                           { 1, 1 }
                        }
                     }
                  }
               },
            },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 82.5 } },
      },
      ColorGain2 = ColorGain {
         Inputs = {
            LockRGB = Input { Value = 1, },
            GainRed = Input {
               SourceOp = "ColorGain2Gain",
               Source = "Value",
            },
            ColorRanges = Input {
               Value = ColorCurves {
                  Curves = {
                     {
                        Points = {
                           { 0, 1 },
                           { 0.125, 0.75 },
                           { 0.375, 0.25 },
                           { 0.5, 0 }
                        }
                     },
                     {
                        Points = {
                           { 0.5, 0 },
                           { 0.625, 0.25 },
                           { 0.875, 0.75 },
                           { 1, 1 }
                        }
                     }
                  }
               },
            },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 148.5 } },
      },
      ColorGain2Gain = BezierSpline {
         SplineColor = { Red = 104, Green = 144, Blue = 233 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 5, 0.33 }, Flags = { Linear = true, Loop = true } },
            [15] = { 0.989999999999999, LH = { 10, 0.659999999999999 }, Flags = { Linear = true, Loop = true } }
         }
      }
   }
}
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 6:45 am

Here's a test...
Attachments
Desktop.zip
(798.72 KiB) Downloaded 121 times
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 2:29 pm

Anyone has tried it? Could you confirm if it runs in 16 standalone, please?
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostMon Mar 02, 2020 2:43 pm

Does what I posted work for you in Fusion 16?
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 3:12 pm

It doesn't, seems to crash for me when I just select the ColorGain1 node
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostMon Mar 02, 2020 6:52 pm

OK, now try this one:

Code: Select all
{
   Tools = ordered() {
      ProbeMe = Background {
         NameSet = true,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "ProbeMeTopLeftRed",
               Source = "Value",
            },
            TopLeftGreen = Input { Value = 0.614, },
            TopLeftBlue = Input { Value = 0.137305136, },
         },
         ViewInfo = OperatorInfo { Pos = { 354.667, 45.5454 } },
      },
      ProbeMeTopLeftRed = BezierSpline {
         SplineColor = { Red = 255, Green = 0, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0.591, RH = { 12, 0.437184666666667 }, Flags = { Linear = true } },
            [36] = { 0.129554, LH = { 24, 0.283369333333333 }, Flags = { Linear = true } }
         }
      },
      Background1 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               Value = 0.652982891520963,
               Expression = "ProbeMe:GetValue(\"TopLeftRed\",time)/ProbeMe:GetValue(\"TopLeftRed\",0)",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 401.333, 87.9697 } },
      }
   }
}
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostMon Mar 02, 2020 10:58 pm

Thanks but when it's pasted only shows two nodes...
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostTue Mar 03, 2020 12:00 am

I know that :)

Does it work, though?
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostTue Mar 03, 2020 12:27 am

It's changing the red values of the background node, I don't see anything else. If the other channels are added, it crashes too :roll:
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostTue Mar 03, 2020 12:55 am

So the expression itself works in Fu9 and Fu16. There is a crash happening in Fu16, but the cause is elsewhere.

I can reproduce the crash, reporting it to BMD.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline

Jimmy Paez

  • Posts: 64
  • Joined: Thu May 05, 2016 12:56 am

Re: Automatic Exposure

PostTue Mar 03, 2020 1:03 am

Yes, thank you! It seems to be a bug, not related to the expression itself; rather to the probe modifier.
Offline
User avatar

Pieter Van Houte

  • Posts: 644
  • Joined: Wed Nov 05, 2014 1:04 am

Re: Automatic Exposure

PostTue Mar 03, 2020 1:24 am

There was no Probe modifier in that last setup.
Support We Suck Less on Patreon -> https://www.patreon.com/wesuckless

https://www.steakunderwater.com/wesuckless
Offline
User avatar

CUBuffskier

  • Posts: 116
  • Joined: Tue Apr 09, 2019 10:39 pm
  • Location: NYC
  • Real Name: Chadwick Shoults

Re: Automatic Exposure

PostMon Mar 11, 2024 10:15 am

I'm seeing Fusion Studio and Resolve Fusion both lock up anytime I try to do any sort of expression that references a value from a probe modifier.

I'm also looking for a better way to match lighting on freeze framed clean plate patches.

Connect to probe values works, but ideally I would like to do some math in an expression like Vito's color gain tutorial, or just with a bc node like in this comp.

https://www.dropbox.com/scl/fi/uwuztac1 ... nsr7u&dl=1
Chadwick Shoults
CreativeVideoTips.com

Resolve Studio 18.0.1 Build3
Apple M1 Max Macbook Pro, 64GB RAM, 24 Core GPU, 2TB SSD, 24" LG Ultrafine, 3G Ultrastudio, Speed Editor
Offline

birdseye

  • Posts: 361
  • Joined: Fri Jun 12, 2020 2:36 pm
  • Real Name: Iain Fisher

Re: Automatic Exposure

PostTue Mar 12, 2024 9:21 am

Connect to probe values works, but ideally I would like to do some math in an expression like Vito's color gain tutorial, or just with a bc node like in this comp.


That may be a case where an indirect approach is needed as in Bryan Ray's tutorial.
Offline
User avatar

CUBuffskier

  • Posts: 116
  • Joined: Tue Apr 09, 2019 10:39 pm
  • Location: NYC
  • Real Name: Chadwick Shoults

Re: Automatic Exposure

PostThu Mar 14, 2024 12:38 pm

Thank you for the suggestion from Bryan. I was able to put this together and it does the trick while avoiding expressions crashing the probe -

Chadwick Shoults
CreativeVideoTips.com

Resolve Studio 18.0.1 Build3
Apple M1 Max Macbook Pro, 64GB RAM, 24 Core GPU, 2TB SSD, 24" LG Ultrafine, 3G Ultrastudio, Speed Editor
Offline

KrunoSmithy

  • Posts: 118
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: Automatic Exposure

PostSun Mar 17, 2024 4:46 am

CUBuffskier wrote:Thank you for the suggestion from Bryan. I was able to put this together and it does the trick while avoiding expressions crashing the probe -




Thank you for the tutorial. I enjoy your stuff.

I used auto exposure with probe for adding a 3D ball and text to a video clip of a burning flame, trying to match the exposure of the flame with the added elements and it does work pretty well. Useful stuff.


Return to Fusion

Who is online

Users browsing this forum: No registered users and 57 guests