Jump to: Board index » General » Fusion

Edge Detect node in Fusion Studio

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

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Edge Detect node in Fusion Studio

PostThu Aug 18, 2022 7:57 pm

Hey guys,

Just a quick question, no real problem if you don't have any clue or any answer : In Resolve (I have Studio but it's maybe in the basic version too), we have an Edge Detect ofx, which we can obviously find as a node in the Fusion tab... I never use it btw but this is off topic (and maybe I should sometimes ?)

But... I almost never use the fusion tab in Resolve for anything else than quick fixes and stuff I know by heart in Fusion (and thus no need to go to Fusion Studio for such minor fine-tuning stuff).

So, is there a way to install any LUA, find a reactor thing or do any copy/pate trick to find it in Fusion Studio too ?

I never really thought about it and I think I'd probably mimic it with a Filter node set on sobel piped in a bitmap node or something like that, but if a super quick way of creating a standalone node would exist, I'd go for it cos' I think my next project would take advantage of it...

So WWBRD ? :D
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Edge Detect node in Fusion Studio

PostMon Aug 22, 2022 8:26 pm

Alas, we still can't get the Blackmagic OFX nodes in Fusion Studio.

I usually use either Sobel or Laplacian in the Filter node, or set something up in CustomFilter. I've looked into some other edge detection algorithms, but my math skills aren't up to understanding them well enough to code them.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostTue Aug 23, 2022 8:56 am

:lol:
At least I'm glad my last dedicated line worked and you answered :mrgreen:

More seriously, yes, I knew of course it's a pity we don't find a bunch of OFXes in Fu Studio where they would be far more deeply used than in the color page...
But unlike the depthmap, magicmask or surface tracker, I wondered wether a Fusion specific reactor macro couldn't exist yet for detecting edges.
Actually the Sobel in the filter node works perfectly for me, I can't deny it, but hey, seeing the EdgeDetect feature in action recently made me want to dig deeper just for information.
For instance, I used EdgeBlurRestoration from M Chalenko when needed and it was a huge success, so keeping aware is always good ...

Anyway thx for your answer ;)
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline

Hendrik Proosa

  • Posts: 3029
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edge Detect node in Fusion Studio

PostTue Aug 23, 2022 9:20 am

Edge detection can be done in many different ways depending on what you actually want to achieve. For example it depends on whether you need edges for masking something, you want to visualize the edges as a stylistic choice etc. Methods also vary widely in where the edge is placed. It can be centered on the gradient or on the dark/light side etc. And then there is the edge width question, some methods create gradient-independent edges while in others edge width and strength depends on underlying gradient.
I do stuff.
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostWed Aug 24, 2022 2:20 pm

Yep, as BR wrote, "I usually use either Sobel or Laplacian in the Filter node" is also what I do, and to answer everything, it's indeed generally for stylistic reasons or to fine-tune roto/green screen stuff...
About the size, a bitmap node after can handle it.
So I'll stick to this in Fu studio, and if I ever find myself in Resolve's fusion tab (as almost never) AND need this kind of thing (very much unlikely :lol: ), I'll use EdgeDetect
Thx for your answers...
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Edge Detect node in Fusion Studio

PostWed Aug 24, 2022 8:11 pm

I frequently do quite a bit of refining on the Sobel or Laplacian filter. Erode/Dilate before running it to choose where exactly on the edge it falls, then erode/dilate afterward to control the width, and a blur to adjust blending. Sometimes I roll my own, using half the Sobel kernel in a CustomFilter if I want to do an edge glint or something. Just remember to clamp black because it creates negative pixels when performed that way. Sandwich it between a pair of Transforms to adjust the angle of the edge mask. I may have put a bevel macro in Reactor that uses that procedure. I don't recall for sure.

There are also some things you can do to fix the edge of frame problem that Sobel creates. I don't remember if I made this one, or if it was Pieter, but it's a nice tool:

Code: Select all
{
   Tools = ordered() {
      EdgeFinder = GroupOperator {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = ordered() {
            Filter = Input { Value = 1, },
            Erode_Dilate = Input { Value = 0.0003, },
            Alpha = Input {
               SourceOp = "EdgeFinderAlpha",
               Source = "Value",
            },
            Input = InstanceInput {
               SourceOp = "InputCrop",
               Source = "Input",
            }
         },
         Outputs = {
            Output = InstanceOutput {
               SourceOp = "OutputCrop",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 1155, 313.5 },
            Flags = {
               AllowPan = false,
               ForceSource = true,
               GridSnap = true,
               ConnectedSnap = true,
               ShowGrid = false,
               AutoSnap = true,
               FullIndicator = true,
               RemoveRouters = true
            },
            Size = { 686, 126.3, 228, 22 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -825, -38.8 }
         },
         Tools = ordered() {
            OutputCrop = Crop {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  XOffset = Input { Value = 5, },
                  YOffset = Input { Value = 5, },
                  XSize = Input {
                     Value = 3840,
                     Expression = "InputCrop.Input.Width",
                  },
                  YSize = Input {
                     Value = 2160,
                     Expression = "InputCrop.Input.Height",
                  },
                  Input = Input {
                     SourceOp = "Blur1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 1210, 82.5 } },
            },
            EdgeDetect = Filter {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  FilterType = Input {
                     Value = 4,
                     Expression = "EdgeFinder.Filter+3",
                  },
                  Red = Input { Expression = "EdgeFinder.Red", },
                  Green = Input { Expression = "EdgeFinder.Green", },
                  Blue = Input { Expression = "EdgeFinder.Blue", },
                  Alpha = Input { Expression = "EdgeFinder.Alpha", },
                  Input = Input {
                     SourceOp = "DupeEdges",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 880, 82.5 } },
            },
            DupeEdges = Transform {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  UseSizeAndAspect = Input { Value = 0, },
                  Edges = Input {
                     Value = 2,
                     Expression = "EdgeFinder.ExcludeImageEdges==1 and 2 or 0",
                  },
                  Input = Input {
                     SourceOp = "InputCrop",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 770, 82.5 } },
            },
            InputCrop = Crop {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  XOffset = Input { Value = -5, },
                  YOffset = Input { Value = -5, },
                  XSize = Input {
                     Value = 3850,
                     Expression = "InputCrop.Input.Width+10",
                  },
                  YSize = Input {
                     Value = 2170,
                     Expression = "InputCrop.Input.Height+10",
                  },
                  Input = Input {
                     SourceOp = "Text1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 660, 82.5 } },
            },
            ErodeDilate1_1 = ErodeDilate {
               CtrlWShown = false,
               Inputs = {
                  XAmount = Input {
                     Value = 0.0003,
                     Expression = "EdgeFinder.Erode_Dilate",
                  },
                  Input = Input {
                     SourceOp = "EdgeDetect",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 990, 82.5 } },
            },
            Blur1 = Blur {
               CtrlWShown = false,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  XBlurSize = Input {
                     Value = 0,
                     Expression = "EdgeFinder.Blur",
                  },
                  Input = Input {
                     SourceOp = "ErodeDilate1_1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 1100, 82.5 } },
            }
         },
         UserControls = ordered() {
            Filter = {
               { CCS_AddString = "Sobel" },
               { CCS_AddString = "Lapacian" },
               INP_Integer = false,
               ICS_ControlPage = "Controls",
               LINKID_DataType = "Number",
               CC_LabelPosition = "Horizontal",
               INPID_InputControl = "ComboControl",
               LINKS_Name = "Filter"
            },
            ExcludeImageEdges = {
               CBC_TriState = false,
               INP_Integer = true,
               LINKID_DataType = "Number",
               INP_Default = 1,
               ICS_ControlPage = "Controls",
               INPID_InputControl = "CheckboxControl",
               LINKS_Name = "Exclude Image Edges"
            },
            Erode_Dilate = {
               INP_Integer = false,
               INPID_InputControl = "SliderControl",
               INP_MaxScale = 0.02,
               INP_Default = 0,
               INP_MinScale = -0.002,
               LINKID_DataType = "Number",
               ICS_ControlPage = "Controls",
               ICD_Center = 0,
               LINKS_Name = "Erode/Dilate"
            },
            Blur = {
               INP_Default = 0,
               INP_Integer = false,
               ICS_ControlPage = "Controls",
               LINKID_DataType = "Number",
               INP_MinScale = 0,
               INPID_InputControl = "SliderControl",
               INP_MaxScale = 100,
               LINKS_Name = "Blur"
            },
            Red = {
               ICD_Width = 0.5,
               INP_Integer = true,
               INP_Default = 1,
               ICS_ControlPage = "Controls",
               CBC_TriState = false,
               LINKID_DataType = "Number",
               INPID_InputControl = "CheckboxControl",
               LINKS_Name = "Red"
            },
            Green = {
               ICD_Width = 0.5,
               INP_Integer = true,
               INP_Default = 1,
               ICS_ControlPage = "Controls",
               CBC_TriState = false,
               LINKID_DataType = "Number",
               INPID_InputControl = "CheckboxControl",
               LINKS_Name = "Green"
            },
            Blue = {
               ICD_Width = 0.5,
               INP_Integer = true,
               INP_Default = 1,
               ICS_ControlPage = "Controls",
               CBC_TriState = false,
               LINKID_DataType = "Number",
               INPID_InputControl = "CheckboxControl",
               LINKS_Name = "Blue"
            },
            Alpha = {
               ICD_Width = 0.5,
               INP_Integer = true,
               INP_Default = 1,
               ICS_ControlPage = "Controls",
               CBC_TriState = false,
               LINKID_DataType = "Number",
               INPID_InputControl = "CheckboxControl",
               LINKS_Name = "Alpha"
            }
         }
      },
      EdgeFinderAlpha = BezierSpline {
         SplineColor = { Red = 5, Green = 236, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [1026] = { 1, RH = { 1028, 1 }, Flags = { Linear = true } },
            [1032] = { 1, LH = { 1030, 1 }, RH = { 1049.66666666667, 1 }, Flags = { Linear = true } },
            [1085] = { 1, LH = { 1067.33333333333, 1 }, RH = { 1087.66666666667, 0.666666666666667 }, Flags = { Linear = true } },
            [1093] = { 0, LH = { 1090.33333333333, 0.333333333333333 }, RH = { 1097, 0.333333333333333 }, Flags = { Linear = true } },
            [1105] = { 1, LH = { 1101, 0.666666666666667 }, Flags = { Linear = true } }
         }
      }
   }
}
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostThu Aug 25, 2022 7:46 am

Cool; thx Bryan, I'll check asap and report asap too ;)
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostFri Aug 26, 2022 5:05 pm

Couldn't find a real interesting situation to test so far...
But as an exchange, check that ;)
Code: Select all
{
   Tools = ordered() {
      BlurredEdgesRestoration = GroupOperator {
         CtrlWZoom = false,
         Inputs = ordered() {
            PreShrink = InstanceInput {
               SourceOp = "Blur_ShrinkEdges",
               Source = "PreShrink",
            },
            PreShrinkAmount = InstanceInput {
               SourceOp = "Blur_ShrinkEdges",
               Source = "PreShrinkAmount",
               Default = 0.001,
            },
            PreShrinkXMultiplier = InstanceInput {
               SourceOp = "Blur_ShrinkEdges",
               Source = "PreShrinkXMultiplier",
               Default = 1,
            },
            PreShrinkYMultiplier = InstanceInput {
               SourceOp = "Blur_ShrinkEdges",
               Source = "PreShrinkYMultiplier",
               Default = 1,
            },
            Extend = InstanceInput {
               SourceOp = "Blur_Extend",
               Source = "Extend",
            },
            ExtendAmount = InstanceInput {
               SourceOp = "Blur_Extend",
               Source = "ExtendAmount",
               Default = 0.003,
            },
            ExtendXMultiplier = InstanceInput {
               SourceOp = "Blur_Extend",
               Source = "ExtendXMultiplier",
               Default = 1,
            },
            ExtendYMultiplier = InstanceInput {
               SourceOp = "Blur_Extend",
               Source = "ExtendYMultiplier",
               Default = 1,
            },
            BorderSoftening = InstanceInput {
               SourceOp = "Blur_Border",
               Source = "BorderSoftening",
            },
            SoftenBorder = InstanceInput {
               SourceOp = "Blur_Border",
               Source = "SoftenBorder",
               Default = 0.001,
            },
            SoftenBorderXMultiplier = InstanceInput {
               SourceOp = "Blur_Border",
               Source = "SoftenBorderXMultiplier",
               Default = 1,
            },
            SoftenBorderYMultiplier = InstanceInput {
               SourceOp = "Blur_Border",
               Source = "SoftenBorderYMultiplier",
               Default = 1,
            },
            SizeMode = InstanceInput {
               SourceOp = "Blur_Border",
               Source = "SizeMode",
               Default = 1,
            },
            Output = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "OutputImage",
            },
            KeyedImage = InstanceInput {
               SourceOp = "PipeRouter1",
               Source = "Input",
               Name = "Keyed Image",
            },
            Blend = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "Blend",
               Page = "Common Controls",
               Default = 1,
            },
            ProcessWhenBlendIs00 = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ProcessWhenBlendIs00",
            },
            ProcessRed = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ProcessRed",
               Default = 1,
            },
            ProcessGreen = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ProcessGreen",
               Default = 1,
            },
            ProcessBlue = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ProcessBlue",
               Default = 1,
            },
            ProcessAlpha = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ProcessAlpha",
               Default = 0,
            },
            ApplyMaskInverted = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "ApplyMaskInverted",
            },
            MultiplyByMask = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "MultiplyByMask",
            },
            MaskChannel = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "MaskChannel",
            },
            MaskHigh = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "MaskHigh",
               ControlGroup = 4,
            },
            MaskLow = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "MaskLow",
               ControlGroup = 4,
            },
            EffectMask = InstanceInput {
               SourceOp = "Mrg_Atop",
               Source = "EffectMask",
            }
         },
         Outputs = {
            MainOutput1 = InstanceOutput {
               SourceOp = "OutputExtendedColor",
               Source = "Output",
            }
         },
         ViewInfo = GroupInfo {
            Pos = { 110, 214.5 },
            Flags = {
               AllowPan = false,
               ForceSource = true,
               GridSnap = true,
               RemoveRouters = true
            },
            Size = { 445.088, 263.373, 222.544, 24.2424 },
            Direction = "Horizontal",
            PipeStyle = "Direct",
            Scale = 1,
            Offset = { -1.18891, 61.5556 }
         },
         Tools = ordered() {
            PipeRouter1 = PipeRouter {
               CtrlWShown = false,
               ViewInfo = PipeRouterInfo { Pos = { -110, -49.5 } },
            },
            Mat_ShrinkEdges = MatteControl {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  LowMatteThreshold = Input { Value = 0.99, },
                  PostMultiplyImage = Input { Value = 1, },
                  Background = Input {
                     SourceOp = "Blur_ShrinkEdges",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -165, 20.6158 } },
               Colors = {
                  TileColor = { R = 0.6, G = 0.450980392156863, B = 0.627450980392157 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               }
            },
            Bol_Extend = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Operation = Input { Value = 7, },
                  ToRed = Input { Value = 8, },
                  ToGreen = Input { Value = 8, },
                  ToBlue = Input { Value = 8, },
                  ToAlpha = Input { Value = 8, },
                  Background = Input {
                     SourceOp = "Blur_Extend",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -165, 115.5 } },
               Colors = {
                  TileColor = { R = 0.776470588235294, G = 0.627450980392157, B = 0.466666666666667 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               }
            },
            DX_OutputPreShrink = Dissolve {
               Transitions = {
                  [0] = "DFTDissolve"
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Blend = Input {
                     Value = 0,
                     Expression = "iif(Mrg_Atop.OutputImage==0,1,0)",
                  },
                  Background = Input {
                     SourceOp = "Bol_MaskToCoverage",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Mat_ShrinkEdges",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 165.934, 115.5 } },
            },
            OutputExtendedColor = Dissolve {
               Transitions = {
                  [0] = "DFTDissolve"
               },
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Blend = Input {
                     Value = 0,
                     Expression = "iif(Mrg_Atop.OutputImage==1,1,0)",
                  },
                  Background = Input {
                     SourceOp = "DX_OutputPreShrink",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Bol_Extend",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 165, 148.5 } },
            },
            Mrg_Atop = Merge {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ProcessAlpha = Input { Value = 0, },
                  Background = Input {
                     SourceOp = "PipeRouter1",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Mat_CutInside",
                     Source = "Output",
                  },
                  Operator = Input { Value = FuID { "Atop" }, },
                  PerformDepthMerge = Input { Value = 0, },
               },
               ViewInfo = OperatorInfo { Pos = { 165, 49.5 } },
               UserControls = ordered() {
                  OutputImage = {
                     { MBTNC_AddButton = "Pre-Shrunk Image" },
                     { MBTNC_AddButton = "Extended Color" },
                     { MBTNC_AddButton = "Final Result" },
                     INP_Default = 2,
                     INPID_InputControl = "MultiButtonControl",
                     MBTNC_StretchToFit = true,
                     IC_ControlPage = 0,
                     LINKID_DataType = "Number",
                     LINKS_Name = "Output Image",
                  }
               }
            },
            Mat_CutInside = MatteControl {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  MatteCombine = Input { Value = 4, },
                  InvertMatte = Input { Value = 1, },
                  PostMultiplyImage = Input { Value = 1, },
                  Background = Input {
                     SourceOp = "Bol_Extend",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Blur_Border",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -55, 82.5 } },
               Colors = {
                  TileColor = { R = 0.6, G = 0.450980392156863, B = 0.627450980392157 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               }
            },
            Blur_ShrinkEdges = Blur {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Gaussian" }, },
                  Red = Input { Value = 0, },
                  Green = Input { Value = 0, },
                  Blue = Input { Value = 0, },
                  LockXY = Input { Value = 0, },
                  XBlurSize = Input {
                     Value = 0.72,
                     Expression = "PreShrinkAmount*720*PreShrinkXMultiplier/iif(Blur_Border.SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  YBlurSize = Input {
                     Value = 0.72,
                     Expression = "PreShrinkAmount*720*PreShrinkYMultiplier/iif(Blur_Border.SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  Input = Input {
                     SourceOp = "PipeRouter1",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -165, -16.5 } },
               Colors = {
                  TileColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               },
               UserControls = ordered() {
                  PreShrink = {
                     INP_Default = 1,
                     IC_ControlPage = 0,
                     LBLC_DropDownButton = true,
                     INPID_InputControl = "LabelControl",
                     LBLC_NumInputs = 3,
                     LBLC_NestLevel = 1,
                     LINKID_DataType = "Number",
                     LINKS_Name = "Pre-Srink Controls",
                  },
                  PreShrinkAmount = {
                     LINKS_Name = "Pre-Srink Amount",
                     ICD_Center = 0.01,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     IC_ControlPage = 0,
                     INP_MaxScale = 0.1,
                     INP_Default = 0.001,
                  },
                  PreShrinkXMultiplier = {
                     INP_Default = 1,
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     LINKS_Name = "Pre-Srink X Multiplier",
                  },
                  PreShrinkYMultiplier = {
                     INP_Default = 1,
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     LINKS_Name = "Pre-Srink Y Multiplier",
                  }
               }
            },
            Blur_Extend = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Multi-box" }, },
                  LockXY = Input { Value = 0, },
                  XBlurSize = Input {
                     Value = 2.16,
                     Expression = "ExtendAmount*720*ExtendXMultiplier/iif(Blur_Border.SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  YBlurSize = Input {
                     Value = 2.16,
                     Expression = "ExtendAmount*720*ExtendYMultiplier/iif(Blur_Border.SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  Input = Input {
                     SourceOp = "Mat_ShrinkEdges",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -165, 82.5 } },
               Colors = {
                  TileColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               },
               UserControls = ordered() {
                  Extend = {
                     INP_Default = 1,
                     IC_ControlPage = 0,
                     LBLC_DropDownButton = true,
                     INPID_InputControl = "LabelControl",
                     LBLC_NumInputs = 3,
                     LBLC_NestLevel = 1,
                     LINKID_DataType = "Number",
                     LINKS_Name = "Extend Controls",
                  },
                  ExtendAmount = {
                     LINKS_Name = "Extend Amount",
                     INP_MaxScale = 0.1,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     IC_ControlPage = 0,
                     ICD_Center = 0.01,
                     INP_Default = 0.003,
                  },
                  ExtendXMultiplier = {
                     LINKS_Name = "Extend X Multiplier",
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     INP_Default = 1,
                  },
                  ExtendYMultiplier = {
                     LINKS_Name = "Extend Y Multiplier",
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     INP_Default = 1,
                  }
               }
            },
            Blur_Border = Blur {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Filter = Input { Value = FuID { "Multi-box" }, },
                  LockXY = Input { Value = 0, },
                  XBlurSize = Input {
                     Value = 0.72,
                     Expression = "SoftenBorder*720*SoftenBorderXMultiplier/iif(SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  YBlurSize = Input {
                     Value = 0.72,
                     Expression = "SoftenBorder*720*SoftenBorderYMultiplier/iif(SizeMode==0, 1, Input.OriginalWidth)",
                  },
                  Input = Input {
                     SourceOp = "Mat_ShrinkEdges",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { -55, 49.5 } },
               Colors = {
                  TileColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               },
               UserControls = ordered() {
                  BorderSoftening = {
                     INP_Default = 1,
                     IC_ControlPage = 0,
                     LBLC_DropDownButton = true,
                     INPID_InputControl = "LabelControl",
                     LBLC_NumInputs = 3,
                     LBLC_NestLevel = 1,
                     LINKID_DataType = "Number",
                     LINKS_Name = "Border Softening Controls",
                  },
                  SoftenBorder = {
                     LINKS_Name = "Soften Border",
                     ICD_Center = 0.01,
                     INPID_InputControl = "SliderControl",
                     LINKID_DataType = "Number",
                     IC_ControlPage = 0,
                     INP_MaxScale = 0.1,
                     INP_Default = 0.001,
                  },
                  SoftenBorderXMultiplier = {
                     LINKS_Name = "Soften Border X Multiplier",
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     INP_Default = 1,
                  },
                  SoftenBorderYMultiplier = {
                     LINKS_Name = "Soften Border Y Multiplier",
                     LINKID_DataType = "Number",
                     INPID_InputControl = "SliderControl",
                     IC_ControlPage = 0,
                     INP_MaxScale = 5,
                     INP_Default = 1,
                  },
                  SizeMode = {
                     { MBTNC_AddButton = "Relative To Image Width" },
                     { MBTNC_AddButton = "In Pixels" },
                     INP_Default = 0,
                     INPID_InputControl = "MultiButtonControl",
                     LINKID_DataType = "Number",
                     IC_ControlPage = 0,
                     MBTNC_StretchToFit = true,
                     LINKS_Name = "Size Mode",
                  }
               }
            },
            Bol_MaskToCoverage = ChannelBoolean {
               CtrlWZoom = false,
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  ToRed = Input { Value = 4, },
                  ToGreen = Input { Value = 4, },
                  ToBlue = Input { Value = 4, },
                  ToAlpha = Input { Value = 4, },
                  EnableExtraChannels = Input { Value = 1, },
                  ToZCoverage = Input { Value = 3, },
                  Background = Input {
                     SourceOp = "Mrg_Atop",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Bol_MultiplyMaskWithAlpha",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 165, 82.5 } },
               Colors = {
                  TileColor = { R = 0.776470588235294, G = 0.627450980392157, B = 0.466666666666667 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               }
            },
            Bol_MultiplyMaskWithAlpha = ChannelBoolean {
               CtrlWShown = false,
               NameSet = true,
               Inputs = {
                  Operation = Input { Value = 6, },
                  Background = Input {
                     SourceOp = "Mat_CutInside",
                     Source = "Output",
                  },
                  Foreground = Input {
                     SourceOp = "Mrg_Atop",
                     Source = "Output",
                  },
               },
               ViewInfo = OperatorInfo { Pos = { 55, 82.5 } },
               Colors = {
                  TileColor = { R = 0.776470588235294, G = 0.627450980392157, B = 0.466666666666667 },
                  TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
               }
            }
         },
         Colors = {
            TileColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
            TextColor = { R = 0.725490196078431, G = 0.690196078431373, B = 0.592156862745098 },
         }
      }
   },
   ActiveTool = "BlurredEdgesRestoration"
}
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostFri Aug 26, 2022 5:49 pm

Done now : great macro, right to the goal.
Thx Bryan :ugeek:
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Edge Detect node in Fusion Studio

PostSun Aug 28, 2022 2:48 pm

Is that modified somehow from Greg Chalenko's original?
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sam Steti

  • Posts: 2497
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Edge Detect node in Fusion Studio

PostSun Aug 28, 2022 4:20 pm

Hey
Just saw your post but really busy to show examples...

Made short, no, it's his original code, I posted it to share and because it's in the same ball park...

Your macro is closer to the topic I posted first, yours is almost exactly - and even a bit more - what I had been doing up to now... but already organized and grouped. Thx for that too.
Sometimes I also used one made on a couple of channel booleans (I think it was inspired from a Damian Allen's suggestion).

GC's one is more sophisticated (as for the number of parameters for instance) and somehow supposed to address a project where the edges are already screwed up finally :) (at least this is when I use it). Comparing these tools, I'll be using yours a lot more often for sure...

But I'm dealing with edges all the year along, so ANY suggestion is ALWAYS much appreciated anyway. I wonder wether I should take time to mix these solutions together and make new macros made of some of these groups one of these days...

Anyway I really appreciated all your inputs, thank yiu very much again.
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin

Return to Fusion

Who is online

Users browsing this forum: Sander de Regt and 33 guests