Page 1 of 1

Chromatic displacement in Fusion?

PostPosted: Wed Jun 19, 2019 8:02 pm
by Tom Early
hi,

Have you guys seen the new VFX suite from Red Giant? In particular I like what can be achieved with the Chromatic Displacement plugin, and was wondering how much of this can be achieved in Fusion (even if it would be slower)?



In particular at 1:44 where he talks about what the displacement is based on, compared to the regular displacement tool in After Effects, does Fusion have this ability?

Re: Chromatic displacement in Fusion?

PostPosted: Thu Jun 20, 2019 8:16 am
by Joe Laude
Easy to do in Fusion. You just use the same displacement map, but displace slightly differently in each channel. Whether you do it with more or less displacement in each channel, or a slightly different fractal pattern in each channel is up to you. They'll give slightly different, but very similar effects (I suspect based on the first couple minutes I watched of the video, that it's using the same displacement, but merely displacing more or less in each color channel)

Here's some examples of what I'm describing:

1. Super basic displacement setup (not the effect, just showing a baseline, like what they did at the start of the video):

Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Detail = Input { Value = 6.07, },
            Seethe = Input { Value = 10.289, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 247.5 } },
      },
      Displace1 = Displace {
         Inputs = {
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input { Value = 0.1, },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "ContrastTweak",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 247.5 } },
      },
      QuickCheckerboard = MacroOperator {
         Inputs = ordered() {
            Input1 = InstanceInput {
               SourceOp = "BecauseGotta",
               Source = "UseFrameFormatSettings",
               Default = 0,
            },
            Input2 = InstanceInput {
               SourceOp = "BecauseGotta",
               Source = "Width",
               Default = 1920,
            },
            Input3 = InstanceInput {
               SourceOp = "BecauseGotta",
               Source = "Height",
               Default = 1080,
            },
            Input4 = InstanceInput {
               SourceOp = "BecauseGotta",
               Source = "PixelAspect",
               DefaultX = 1,
               DefaultY = 1,
            },
            Input5 = InstanceInput {
               SourceOp = "CheckerboardGen",
               Source = "PointIn1",
               Name = "Center",
            },
            Input6 = InstanceInput {
               SourceOp = "CheckerboardGen",
               Source = "SquareSize",
               Page = "Controls",
               Default = 64,
            },
            Input7 = InstanceInput {
               SourceOp = "ContrastTweak",
               Source = "Contrast",
               Default = -0.5,
            }
         },
         Outputs = {
            MainOutput1 = InstanceOutput {
               SourceOp = "ContrastTweak",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo { Pos = { 605, 148.5 } },
         Tools = ordered() {
            BecauseGotta = Background {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 10.15 } },
            },
            CheckerboardGen = Custom {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  NumberIn1 = Input {
                     Value = 64,
                     Expression = "SquareSize",
                  },
                  LUTIn1 = Input {
                     SourceOp = "CheckerboardGenLUTIn1",
                     Source = "Value",
                  },
                  LUTIn2 = Input {
                     SourceOp = "CheckerboardGenLUTIn2",
                     Source = "Value",
                  },
                  LUTIn3 = Input {
                     SourceOp = "CheckerboardGenLUTIn3",
                     Source = "Value",
                  },
                  LUTIn4 = Input {
                     SourceOp = "CheckerboardGenLUTIn4",
                     Source = "Value",
                  },
                  Intermediate1 = Input { Value = "(((x*w)-(p1x*w))%n1)>(n1/2-1)", },
                  Intermediate2 = Input { Value = "(((y*h)-(p1y*h))%n1)>(n1/2-1)", },
                  RedExpression = Input { Value = "i1==i2", },
                  GreenExpression = Input { Value = "i1==i2", },
                  BlueExpression = Input { Value = "i1==i2", },
                  ShowNumber2 = Input { Value = 0, },
                  ShowNumber3 = Input { Value = 0, },
                  ShowNumber4 = Input { Value = 0, },
                  ShowNumber5 = Input { Value = 0, },
                  ShowNumber6 = Input { Value = 0, },
                  ShowNumber7 = Input { Value = 0, },
                  ShowNumber8 = Input { Value = 0, },
                  ShowPoint2 = Input { Value = 0, },
                  ShowPoint3 = Input { Value = 0, },
                  ShowPoint4 = Input { Value = 0, },
                  ShowLUT1 = Input { Value = 0, },
                  ShowLUT2 = Input { Value = 0, },
                  ShowLUT3 = Input { Value = 0, },
                  ShowLUT4 = Input { Value = 0, },
                  Image1 = Input {
                     SourceOp = "BecauseGotta",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 43.15 } },
               UserControls = ordered() {
                  SquareSize = {
                     ICS_ControlPage = "Controls",
                     INP_Integer = true,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     INP_MinScale = 2,
                     INP_Default = 64,
                     INP_MaxScale = 1024,
                     LINKS_Name = "Square Size"
                  }
               }
            },
            CheckerboardGenLUTIn1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 0, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn2 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 204, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn3 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 0, Blue = 204 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn4 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 204, Blue = 204 },
               CtrlWShown = false,
            },
            ContrastTweak = BrightnessContrast {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Contrast = Input { Value = -0.5, },
                  Input = Input {
                     SourceOp = "CheckerboardGen",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 76.15 } },
            }
         },
      }
   }
}


2. Same FastNoise pattern, but with different distortion levels in each channel:

Code: Select all
{
   Tools = ordered() {
      FastNoise1_1 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Detail = Input { Value = 6.07, },
            Seethe = Input { Value = 10.289, },
         },
         ViewInfo = OperatorInfo { Pos = { 935, 247.5 } },
      },
      Displace1_2 = Displace {
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.105,
               Expression = "Displace1_1.XRefraction*1.05",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.105,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1155, 247.5 } },
      },
      Displace1_3 = Displace {
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessGreen = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.11,
               Expression = "Displace1_1.XRefraction*1.1",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.11,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1155, 280.5 } },
      },
      QuickCheckerboard_1 = MacroOperator {
         Inputs = ordered() {
            Input1 = InstanceInput {
               SourceOp = "BecauseGotta_1",
               Source = "UseFrameFormatSettings",
               Default = 0,
            },
            Input2 = InstanceInput {
               SourceOp = "BecauseGotta_1",
               Source = "Width",
               Default = 1920,
            },
            Input3 = InstanceInput {
               SourceOp = "BecauseGotta_1",
               Source = "Height",
               Default = 1080,
            },
            Input4 = InstanceInput {
               SourceOp = "BecauseGotta_1",
               Source = "PixelAspect",
               DefaultX = 1,
               DefaultY = 1,
            },
            Input5 = InstanceInput {
               SourceOp = "CheckerboardGen_1",
               Source = "PointIn1",
               Name = "Center",
            },
            Input6 = InstanceInput {
               SourceOp = "CheckerboardGen_1",
               Source = "SquareSize",
               Page = "Controls",
               Default = 64,
            },
            Input7 = InstanceInput {
               SourceOp = "ContrastTweak_1",
               Source = "Contrast",
               Default = -0.5,
            }
         },
         Outputs = {
            MainOutput1 = InstanceOutput {
               SourceOp = "ContrastTweak_1",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo { Pos = { 1155, 148.5 } },
         Tools = ordered() {
            BecauseGotta_1 = Background {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 10.15 } },
            },
            CheckerboardGen_1 = Custom {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  NumberIn1 = Input {
                     Value = 64,
                     Expression = "SquareSize",
                  },
                  LUTIn1 = Input {
                     SourceOp = "CheckerboardGenLUTIn1_1",
                     Source = "Value",
                  },
                  LUTIn2 = Input {
                     SourceOp = "CheckerboardGenLUTIn2_1",
                     Source = "Value",
                  },
                  LUTIn3 = Input {
                     SourceOp = "CheckerboardGenLUTIn3_1",
                     Source = "Value",
                  },
                  LUTIn4 = Input {
                     SourceOp = "CheckerboardGenLUTIn4_1",
                     Source = "Value",
                  },
                  Intermediate1 = Input { Value = "(((x*w)-(p1x*w))%n1)>(n1/2-1)", },
                  Intermediate2 = Input { Value = "(((y*h)-(p1y*h))%n1)>(n1/2-1)", },
                  RedExpression = Input { Value = "i1==i2", },
                  GreenExpression = Input { Value = "i1==i2", },
                  BlueExpression = Input { Value = "i1==i2", },
                  ShowNumber2 = Input { Value = 0, },
                  ShowNumber3 = Input { Value = 0, },
                  ShowNumber4 = Input { Value = 0, },
                  ShowNumber5 = Input { Value = 0, },
                  ShowNumber6 = Input { Value = 0, },
                  ShowNumber7 = Input { Value = 0, },
                  ShowNumber8 = Input { Value = 0, },
                  ShowPoint2 = Input { Value = 0, },
                  ShowPoint3 = Input { Value = 0, },
                  ShowPoint4 = Input { Value = 0, },
                  ShowLUT1 = Input { Value = 0, },
                  ShowLUT2 = Input { Value = 0, },
                  ShowLUT3 = Input { Value = 0, },
                  ShowLUT4 = Input { Value = 0, },
                  Image1 = Input {
                     SourceOp = "BecauseGotta_1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 43.15 } },
               UserControls = ordered() {
                  SquareSize = {
                     ICS_ControlPage = "Controls",
                     INP_Integer = true,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     INP_MinScale = 2,
                     INP_Default = 64,
                     INP_MaxScale = 1024,
                     LINKS_Name = "Square Size"
                  }
               }
            },
            CheckerboardGenLUTIn1_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 0, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn2_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 204, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn3_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 0, Blue = 204 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn4_1 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 204, Blue = 204 },
               CtrlWShown = false,
            },
            ContrastTweak_1 = BrightnessContrast {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Contrast = Input { Value = -0.5, },
                  Input = Input {
                     SourceOp = "CheckerboardGen_1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 76.15 } },
            }
         },
      },
      Displace1_1 = Displace {
         Inputs = {
            ProcessGreen = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input { Value = 0.1, },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "ContrastTweak_1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1155, 214.5 } },
      }
   }
}


3. Same distortion levels, but slightly different noise pattern:

Code: Select all
{
   Tools = ordered() {
      FastNoise1_2 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Detail = Input { Value = 6.07, },
            Seethe = Input { Value = 10.289, },
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 214.5 } },
      },
      QuickCheckerboard_2 = MacroOperator {
         Inputs = ordered() {
            Input1 = InstanceInput {
               SourceOp = "BecauseGotta_2",
               Source = "UseFrameFormatSettings",
               Default = 0,
            },
            Input2 = InstanceInput {
               SourceOp = "BecauseGotta_2",
               Source = "Width",
               Default = 1920,
            },
            Input3 = InstanceInput {
               SourceOp = "BecauseGotta_2",
               Source = "Height",
               Default = 1080,
            },
            Input4 = InstanceInput {
               SourceOp = "BecauseGotta_2",
               Source = "PixelAspect",
               DefaultX = 1,
               DefaultY = 1,
            },
            Input5 = InstanceInput {
               SourceOp = "CheckerboardGen_2",
               Source = "PointIn1",
               Name = "Center",
            },
            Input6 = InstanceInput {
               SourceOp = "CheckerboardGen_2",
               Source = "SquareSize",
               Page = "Controls",
               Default = 64,
            },
            Input7 = InstanceInput {
               SourceOp = "ContrastTweak_2",
               Source = "Contrast",
               Default = -0.5,
            }
         },
         Outputs = {
            MainOutput1 = InstanceOutput {
               SourceOp = "ContrastTweak_2",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo { Pos = { 1705, 148.5 } },
         Tools = ordered() {
            BecauseGotta_2 = Background {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 10.15 } },
            },
            CheckerboardGen_2 = Custom {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  NumberIn1 = Input {
                     Value = 64,
                     Expression = "SquareSize",
                  },
                  LUTIn1 = Input {
                     SourceOp = "CheckerboardGenLUTIn1_2",
                     Source = "Value",
                  },
                  LUTIn2 = Input {
                     SourceOp = "CheckerboardGenLUTIn2_2",
                     Source = "Value",
                  },
                  LUTIn3 = Input {
                     SourceOp = "CheckerboardGenLUTIn3_2",
                     Source = "Value",
                  },
                  LUTIn4 = Input {
                     SourceOp = "CheckerboardGenLUTIn4_2",
                     Source = "Value",
                  },
                  Intermediate1 = Input { Value = "(((x*w)-(p1x*w))%n1)>(n1/2-1)", },
                  Intermediate2 = Input { Value = "(((y*h)-(p1y*h))%n1)>(n1/2-1)", },
                  RedExpression = Input { Value = "i1==i2", },
                  GreenExpression = Input { Value = "i1==i2", },
                  BlueExpression = Input { Value = "i1==i2", },
                  ShowNumber2 = Input { Value = 0, },
                  ShowNumber3 = Input { Value = 0, },
                  ShowNumber4 = Input { Value = 0, },
                  ShowNumber5 = Input { Value = 0, },
                  ShowNumber6 = Input { Value = 0, },
                  ShowNumber7 = Input { Value = 0, },
                  ShowNumber8 = Input { Value = 0, },
                  ShowPoint2 = Input { Value = 0, },
                  ShowPoint3 = Input { Value = 0, },
                  ShowPoint4 = Input { Value = 0, },
                  ShowLUT1 = Input { Value = 0, },
                  ShowLUT2 = Input { Value = 0, },
                  ShowLUT3 = Input { Value = 0, },
                  ShowLUT4 = Input { Value = 0, },
                  Image1 = Input {
                     SourceOp = "BecauseGotta_2",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 43.15 } },
               UserControls = ordered() {
                  SquareSize = {
                     ICS_ControlPage = "Controls",
                     INP_Integer = true,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     INP_MinScale = 2,
                     INP_Default = 64,
                     INP_MaxScale = 1024,
                     LINKS_Name = "Square Size"
                  }
               }
            },
            CheckerboardGenLUTIn1_2 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 0, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn2_2 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 204, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn3_2 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 0, Blue = 204 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn4_2 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 204, Blue = 204 },
               CtrlWShown = false,
            },
            ContrastTweak_2 = BrightnessContrast {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Contrast = Input { Value = -0.5, },
                  Input = Input {
                     SourceOp = "CheckerboardGen_2",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 76.15 } },
            }
         },
      },
      Displace1_4 = Displace {
         Inputs = {
            ProcessGreen = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input { Value = 0.1, },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "ContrastTweak_2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 214.5 } },
      },
      Displace1_5 = Displace {
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.1,
               Expression = "Displace1_4.XRefraction",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_4",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Instance_FastNoise1_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 247.5 } },
      },
      Instance_FastNoise1_2 = FastNoise {
         SourceOp = "FastNoise1_2",
         Inputs = {
            ["Gamut.ColorSpaceNest"] = Input { },
            ["Gamut.GammaSpaceNest"] = Input { },
            Seethe = Input {
               Value = 10.2941445,
               Expression = "FastNoise1_2.Seethe*1.0005"
            },
            StartEndRenderScripts = Input { },
            EffectMask = Input { },
            NoiseBrightnessMap = Input { },
            NoiseDetailMap = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 247.5 } },
      },
      Displace1_6 = Displace {
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessGreen = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.1,
               Expression = "Displace1_4.XRefraction",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_5",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Instance_FastNoise1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1705, 280.5 } },
      },
      Instance_FastNoise1_3 = FastNoise {
         CtrlWZoom = false,
         SourceOp = "FastNoise1_2",
         Inputs = {
            ["Gamut.ColorSpaceNest"] = Input { },
            ["Gamut.GammaSpaceNest"] = Input { },
            Seethe = Input {
               Value = 10.299289,
               Expression = "FastNoise1_2.Seethe*1.001"
            },
            StartEndRenderScripts = Input { },
            EffectMask = Input { },
            NoiseBrightnessMap = Input { },
            NoiseDetailMap = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 280.5 } },
      }
   }
}


4. Combo of 2 & 3 (different displacement AND different pattern):

Code: Select all
{
   Tools = ordered() {
      FastNoise1_3 = FastNoise {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Detail = Input { Value = 6.07, },
            Seethe = Input { Value = 10.289, },
         },
         ViewInfo = OperatorInfo { Pos = { 2035, 214.5 } },
      },
      Instance_FastNoise1_4 = FastNoise {
         SourceOp = "FastNoise1_3",
         Inputs = {
            ["Gamut.ColorSpaceNest"] = Input { },
            ["Gamut.GammaSpaceNest"] = Input { },
            Seethe = Input {
               Value = 10.2941445,
               Expression = "FastNoise1_3.Seethe*1.0005"
            },
            StartEndRenderScripts = Input { },
            EffectMask = Input { },
            NoiseBrightnessMap = Input { },
            NoiseDetailMap = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 2035, 247.5 } },
      },
      Instance_FastNoise1_5 = FastNoise {
         SourceOp = "FastNoise1_3",
         Inputs = {
            ["Gamut.ColorSpaceNest"] = Input { },
            ["Gamut.GammaSpaceNest"] = Input { },
            Seethe = Input {
               Value = 10.299289,
               Expression = "FastNoise1_3.Seethe*1.001"
            },
            StartEndRenderScripts = Input { },
            EffectMask = Input { },
            NoiseBrightnessMap = Input { },
            NoiseDetailMap = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 2035, 280.5 } },
      },
      Displace1_9 = Displace {
         Inputs = {
            ProcessGreen = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input { Value = 0.1, },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.1,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "ContrastTweak_3",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FastNoise1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 2255, 214.5 } },
      },
      Displace1_8 = Displace {
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessBlue = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.105,
               Expression = "Displace1_9.XRefraction*1.05",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.105,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_9",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Instance_FastNoise1_4",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 2255, 247.5 } },
      },
      Displace1_7 = Displace {
         CtrlWZoom = false,
         Inputs = {
            ProcessRed = Input { Value = 0, },
            ProcessGreen = Input { Value = 0, },
            Type = Input { Value = 1, },
            XOffset = Input { Value = -0.5, },
            XRefraction = Input {
               Value = 0.11,
               Expression = "Displace1_9.XRefraction*1.1",
            },
            YOffset = Input { Value = -0.5, },
            YRefraction = Input {
               Value = 0.11,
               Expression = "XRefraction",
            },
            Input = Input {
               SourceOp = "Displace1_8",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Instance_FastNoise1_5",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 2255, 280.5 } },
      },
      QuickCheckerboard_3 = MacroOperator {
         Inputs = ordered() {
            Input1 = InstanceInput {
               SourceOp = "BecauseGotta_3",
               Source = "UseFrameFormatSettings",
               Default = 0,
            },
            Input2 = InstanceInput {
               SourceOp = "BecauseGotta_3",
               Source = "Width",
               Default = 1920,
            },
            Input3 = InstanceInput {
               SourceOp = "BecauseGotta_3",
               Source = "Height",
               Default = 1080,
            },
            Input4 = InstanceInput {
               SourceOp = "BecauseGotta_3",
               Source = "PixelAspect",
               DefaultX = 1,
               DefaultY = 1,
            },
            Input5 = InstanceInput {
               SourceOp = "CheckerboardGen_3",
               Source = "PointIn1",
               Name = "Center",
            },
            Input6 = InstanceInput {
               SourceOp = "CheckerboardGen_3",
               Source = "SquareSize",
               Page = "Controls",
               Default = 64,
            },
            Input7 = InstanceInput {
               SourceOp = "ContrastTweak_3",
               Source = "Contrast",
               Default = -0.5,
            }
         },
         Outputs = {
            MainOutput1 = InstanceOutput {
               SourceOp = "ContrastTweak_3",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo { Pos = { 2255, 148.5 } },
         Tools = ordered() {
            BecauseGotta_3 = Background {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  GlobalIn = Input { Value = 1, },
                  Width = Input { Value = 1920, },
                  Height = Input { Value = 1080, },
                  ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 10.15 } },
            },
            CheckerboardGen_3 = Custom {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  NumberIn1 = Input {
                     Value = 64,
                     Expression = "SquareSize",
                  },
                  LUTIn1 = Input {
                     SourceOp = "CheckerboardGenLUTIn1_3",
                     Source = "Value",
                  },
                  LUTIn2 = Input {
                     SourceOp = "CheckerboardGenLUTIn2_3",
                     Source = "Value",
                  },
                  LUTIn3 = Input {
                     SourceOp = "CheckerboardGenLUTIn3_3",
                     Source = "Value",
                  },
                  LUTIn4 = Input {
                     SourceOp = "CheckerboardGenLUTIn4_3",
                     Source = "Value",
                  },
                  Intermediate1 = Input { Value = "(((x*w)-(p1x*w))%n1)>(n1/2-1)", },
                  Intermediate2 = Input { Value = "(((y*h)-(p1y*h))%n1)>(n1/2-1)", },
                  RedExpression = Input { Value = "i1==i2", },
                  GreenExpression = Input { Value = "i1==i2", },
                  BlueExpression = Input { Value = "i1==i2", },
                  ShowNumber2 = Input { Value = 0, },
                  ShowNumber3 = Input { Value = 0, },
                  ShowNumber4 = Input { Value = 0, },
                  ShowNumber5 = Input { Value = 0, },
                  ShowNumber6 = Input { Value = 0, },
                  ShowNumber7 = Input { Value = 0, },
                  ShowNumber8 = Input { Value = 0, },
                  ShowPoint2 = Input { Value = 0, },
                  ShowPoint3 = Input { Value = 0, },
                  ShowPoint4 = Input { Value = 0, },
                  ShowLUT1 = Input { Value = 0, },
                  ShowLUT2 = Input { Value = 0, },
                  ShowLUT3 = Input { Value = 0, },
                  ShowLUT4 = Input { Value = 0, },
                  Image1 = Input {
                     SourceOp = "BecauseGotta_3",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 43.15 } },
               UserControls = ordered() {
                  SquareSize = {
                     ICS_ControlPage = "Controls",
                     INP_Integer = true,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     INP_MinScale = 2,
                     INP_Default = 64,
                     INP_MaxScale = 1024,
                     LINKS_Name = "Square Size"
                  }
               }
            },
            CheckerboardGenLUTIn1_3 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 0, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn2_3 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 204, Blue = 0 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn3_3 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 0, Green = 0, Blue = 204 },
               CtrlWShown = false,
            },
            CheckerboardGenLUTIn4_3 = LUTBezier {
               KeyColorSplines = {
                  [0] = {
                     [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
                     [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
                  }
               },
               SplineColor = { Red = 204, Green = 204, Blue = 204 },
               CtrlWShown = false,
            },
            ContrastTweak_3 = BrightnessContrast {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Contrast = Input { Value = -0.5, },
                  Input = Input {
                     SourceOp = "CheckerboardGen_3",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 0, 76.15 } },
            }
         },
      }
   }
}


Those should get you started in thinking about how to accomplish the effect.

Re: Chromatic displacement in Fusion?

PostPosted: Thu Jun 20, 2019 8:17 am
by Hendrik Proosa
From the looks and how it is described I'd say you could get something like this by:
- blur the texture by amount x (this is the smoothness control);
- run some 3x3 matrices over it to get gradient vectors;
- multiply these gradient vectors by some scalar for displacement strength;
- add these vectors to original pixel coords to produce a lookup map;
- use that map as texture lookup into image you want to distort
- for chromatic effect, use different scalars for rgb channels in displacement strength;
- for smoother steps, use multiple copies with different strengths and average them together or use something like vector blur for spreading.

EDIT: Joe got here while I was typing :)

Re: Chromatic displacement in Fusion?

PostPosted: Fri Jun 21, 2019 3:50 pm
by Tom Early
thanks guys, I'll look into this!