Page 1 of 1

How to add border to node?

PostPosted: Fri Aug 12, 2022 11:54 pm
by PedjaS
I created simple fusion containing two texts. Letters are white but two texts are touching each other creating visual effect of one shape.

Now, I want to add border to that shape.

All I found was how to add border to each text separately but that is not what I want. What I need is to treat both text as one shape that has border on all edges but those where texts are touching each other.

Here is example. Left image shows how I can do in fusion, right one shows how I want it to look.

text-outline.png
text-outline.png (14.42 KiB) Viewed 2151 times

Re: How to add border to node?

PostPosted: Sat Aug 13, 2022 3:50 am
by Eyn-0519
You can use "ErodeDilate" node, adjustment amount.
Code: Select all
{
   Tools = ordered() {
      Text_A = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            Enabled2 = Input { Value = 1, },
            StyledText = Input { Value = "A", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 1, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 275, -16.5 } },
      },
      Transform1 = Transform {
         Inputs = {
            Center = Input { Value = { 0.375, 0.5 }, },
            Input = Input {
               SourceOp = "Text_A",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 275, 16.5 } },
      },
      Transform2 = Transform {
         Inputs = {
            Center = Input { Value = { 0.65, 0.5 }, },
            Input = Input {
               SourceOp = "Text_B",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 49.5 } },
      },
      Text_B = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            Enabled2 = Input { Value = 1, },
            StyledText = Input { Value = "B", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 1, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, -16.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Transform2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 82.5 } },
      },
      Instance_Transform1 = Transform {
         SourceOp = "Transform1",
         Inputs = {
            SettingsNest = Input { },
            TransformNest = Input { },
            ReferenceSize = Input { },
            Input = Input {
               SourceOp = "Text_A_1",
               Source = "Output",
            },
            CommentsNest = Input { },
            FrameRenderScriptNest = Input { },
            StartRenderScripts = Input { },
            EndRenderScripts = Input { },
            EffectMask = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 605, 16.5 } },
      },
      Text_A_1 = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            StyledText = Input { Value = "A", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 1, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, -16.5 } },
      },
      Merge2 = Merge {
         NameSet = true,
         Inputs = {
            Background = Input {
               SourceOp = "Instance_Transform1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Instance_Transform2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 82.5 } },
      },
      Instance_Transform2 = Transform {
         SourceOp = "Transform2",
         Inputs = {
            SettingsNest = Input { },
            TransformNest = Input { },
            ReferenceSize = Input { },
            Input = Input {
               SourceOp = "Text_B_1",
               Source = "Output",
            },
            CommentsNest = Input { },
            FrameRenderScriptNest = Input { },
            StartRenderScripts = Input { },
            EndRenderScripts = Input { },
            EffectMask = Input { }
         },
         ViewInfo = OperatorInfo { Pos = { 715, 49.5 } },
      },
      Text_B_1 = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            StyledText = Input { Value = "B", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 1, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, -16.5 } },
      },
      ErodeDilate1 = ErodeDilate {
         CtrlWZoom = false,
         Inputs = {
            Filter = Input { Value = 3, },
            XAmount = Input { Value = 0.01, },
            Input = Input {
               SourceOp = "Merge2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 115.5 } },
      },
      Background1 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "ErodeDilate1",
               Source = "Output",
            },
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 148.5 } },
      },
      Merge2_1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Merge2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 181.5 } },
      }
   }
}

Re: How to add border to node?

PostPosted: Sat Aug 13, 2022 6:37 am
by Sander de Regt
Is there a reason why you use 2 seperate text nodes?

Re: How to add border to node?

PostPosted: Sat Aug 13, 2022 7:41 am
by PedjaS
Thanks a lot.

I have two words, different fonts and sizes, and they are not positioned in simple manner as in example.

I must say this is overwhelming for novice user. I expected there could be simple tool to apply for simple effect as outline which is often needed.

In meanwhile I found out this:



It also helped. I added link here if someone else looks for the same thing.

Re: How to add border to node?

PostPosted: Sat Aug 13, 2022 4:58 pm
by xunile
You can also use a combination of Tracking, Manual Positioning, and Character Level Styling to get that look with multiple words and different fonts.