Jump to: Board index » General » Fusion

driving the points of a sPolygon by expressions

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

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 10:43 am

I'm trying to creat an interactive callout-setup with shape nodes. Therefore I published the position/offset of my "drivers" for the callout line points (text, "elbow", endpoint) and fed the values into the respective fields of the line points.
Everything works as expexted, the values change accordingly as I move my objects - only the polygon line simply doesn't update in the editor. The points just stay where they are (I can drag and move them freely around) while the values tell me, they should be in completely different positions.

It's working flawlessly with normal txt/paint/ellipse nodes.
Could anybody tell me, what I'm doing wrong here?
BMDFusionCallout.jpg
sCallout node setup
BMDFusionCallout.jpg (358.35 KiB) Viewed 1236 times


Here's the .settings-file:
MX-sCallout.zip
(1.3 KiB) Downloaded 46 times
Offline
User avatar

KrunoSmithy

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

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 11:35 am

How is the end result supposed to look like? I see the elements, but I'm not sure which one should go where in your final version.

I don't see a publish option for the individual points in the shape system, unlike regular polygon or B-spline. Not sure if its supported.

How did you get to modifiers for individual points?

Interestingly though, it would seem ordinary B-spline or polygon can publish to sPolygon or B-Spline. They are off in position, but can be connected to. Not quite sure how would one use it to drive an animation.
Offline

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 12:19 pm

I want the first point of the sPolygon to match the sTxT position and the last one to match sEllipse position, so I can just drag them where I want. The "elbow" object is just a helper tool to position the kink in the line and not visible in the final image. It just provides the X position for the sPolygons middle point (the Y position is driven by the Txt object) and can also be freely dragged around.
To be able to publish the sPolygon points, you need to first click on "publishing Path point enabled" in the context menu (strange, but that's the way it is...)
After that everything is the same as with regular polygons.
Offline
User avatar

KrunoSmithy

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

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 1:14 pm

I didn't have time to finish at the moment, but if you can publish the points as you explained, which you can, than similar to regular polygon you can than publish the points you want, and they appear as list in the sPolygon node. You can publish them once again from there to appear in the modifier tab of the sPolygon node, so others can connect to them.

I was able to connect sText to one of the points but the problem is that its just X,Y coordinates so the text spins around that one point. You would probably need to make connect to multiple points or at one corner of the text which you can do probably by using either transform or layout controls to connect to spolyon point and than the one that is not in use to offset the text from the center.

And for the sElipse or the other shape, you have X and Y controls instead of displacement path, so you need to somehow connect the two. I've managed to do that by going to sPolygon and modifying one of the published points with X and Y path, which than can be connected to X and Y position of the shape.

Something like this. The rest I leave to you. I would think it would be easier to do this outside of shape system, where you have more mature tools and more tools in general. But if you wanted to do it in shape system, I think this is how I would start and than refine it.

Code: Select all
{
   Tools = ordered() {
      Callout_sTxt = sText {
         NameSet = true,
         Inputs = {
            Center = Input {
               SourceOp = "Offset1",
               Source = "Position",
            },
            LayoutRotation = Input { Value = 1, },
            SelectTransform = Input { Value = 2, },
            LineOffset = Input { Value = { -0.164, 0 }, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "CallOut Text Input", },
            Font = Input { Value = "Bahnschrift", },
            Style = Input { Value = "Light SemiCondensed", },
            Size = Input { Value = 0.053, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            Path = Input {
               Value = Polyline {
               },
            }
         },
         ViewInfo = OperatorInfo { Pos = { -28.2111, 16.4231 } },
      },
      Offset1 = Offset {
         Inputs = {
            Position = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            Mode = Input { Value = 4, },
            AngleScale = Input { Value = 1, }
         },
      },
      Publish1 = PublishPoint {
         Inputs = {
            Value = Input { Value = { -0.113059117541469, -0.00132971770946976 }, }
         },
      },
      CalloutDot_sEllipse = sEllipse {
         NameSet = true,
         Inputs = {
            Solid = Input { Value = 0, },
            BorderWidth = Input { Value = 0.001, },
            ["Translate.X"] = Input {
               SourceOp = "XYPath1X",
               Source = "Value",
            },
            ["Translate.Y"] = Input {
               SourceOp = "XYPath1Y",
               Source = "Value",
            },
            Width = Input { Value = 0.0380175074962881, },
            Height = Input { Value = 0.0380175074962881, }
         },
         ViewInfo = OperatorInfo { Pos = { -215.83, 75.5663 } },
      },
      XYPath1X = BezierSpline {
         SplineColor = { Red = 255, Green = 0, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [30] = { 0.253312095028633 }
         }
      },
      XYPath1Y = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [30] = { 0.122661666138033 }
         }
      },
      sMerge2 = sMerge {
         Inputs = {
            Input1 = Input {
               SourceOp = "sPolygon1",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "Callout_sTxt",
               Source = "Output",
            },
            Input3 = Input {
               SourceOp = "CalloutDot_sEllipse",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { -49.2618, 75.5663 } },
      },
      sRender2 = sRender {
         Inputs = {
            GlobalOut = Input { Value = 486, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Input = Input {
               SourceOp = "sMerge2",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 96.8739, 75.5663 } },
      },
      sPolygon1 = sPolygon {
         DrawMode = "ModifyOnly",
         CtrlWZoom = false,
         Inputs = {
            Solid = Input { Value = 0, },
            BorderWidth = Input { Value = 0.01, },
            Polyline = Input {
               SourceOp = "sPolygon1Polyline",
               Source = "Value",
            },
            Point0 = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            Point1 = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            Point2 = Input {
               SourceOp = "Publish3",
               Source = "Value",
            }
         },
         ViewInfo = OperatorInfo { Pos = { -70.3126, 126.135 } },
      },
      sPolygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [30] = { 0, Flags = { LockedY = true }, Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.113059117541469, Y = -0.00132971770946976, RX = 0.0579150444575344, RY = -0.0400141046509331, PublishID = "Point0" },
                     { Linear = true, X = 0.0606860158311346, Y = -0.121372031662269, LX = -0.0579150444575344, LY = 0.0400141046509331, RX = 0.0642086930658329, RY = 0.0813445659334339, PublishID = "Point1" },
                     { Linear = true, X = 0.253312095028633, Y = 0.122661666138033, LX = -0.0642086930658329, LY = -0.0813445659334339, PublishID = "Point2" }
                  }
               } }
         }
      },
      Publish2 = PublishPoint {
         Inputs = {
            Value = Input { Value = { 0.0606860158311346, -0.121372031662269 }, }
         },
      },
      Publish3 = PublishPoint {
         Inputs = {
            Value = Input {
               SourceOp = "XYPath1",
               Source = "Value",
            }
         },
      },
      XYPath1 = XYPath {
         ShowKeyPoints = false,
         DrawMode = "ModifyOnly",
         CtrlWZoom = false,
         Inputs = {
            X = Input {
               SourceOp = "XYPath1X",
               Source = "Value",
            },
            Y = Input {
               SourceOp = "XYPath1Y",
               Source = "Value",
            }
         },
      }
   }
}
Offline

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 2:18 pm

Thanks for your work, I appreciate it.
But, I want it the other way 'round. It's the sTxt and sEllipse I want to move. The sPolygons points should follow. And, as I mentioned: According to the coordinateValues in the modifier tab, they DO. But they don't in the viewport. The sPolygon node simply ignores the values that are passed onto it.
As you can see in the screenshot, Ponit0, which is connected to the sTxt, has the exact same coordinate values, but I cann drag it anywhere. For example into the lower right corner, as shown, while the sTxt is in the upper left. Same goes for the point2, which is connected to the ellipse.
BMDFusionCallout_1.jpg
BMDFusionCallout_1.jpg (159.32 KiB) Viewed 1122 times


As said before - it's workin with regular nodes. I just don't understand how the sPolygon node can ignore the value of its points.

I should mention I'm in the FusionPage of Resolve 19.1 Build12.
Just threw the .settings-file into Fusion18, but there the sTxt and sPolygon nodes don't exist jet.
Offline

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 2:47 pm

There seems to be a logic behind that all: the sBSpline shows the exact same behaviour. It's as if the published points are somehow disconnected from the objects.

edit: After more testing I'm willing to call this a bug - it's just a one-way-connection from the object to the inspector. You can even alter the values in the inspector, the spline/polygon will not change. Only sBSpline and sPolygon will behave in this way. That said, it's all down to points. You simply can't modify the points position, even though the inspector tells you could.
Last edited by maxen13126 on Tue Apr 01, 2025 9:44 am, edited 1 time in total.
Offline
User avatar

KrunoSmithy

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

Re: driving the points of a sPolygon by expressions

PostWed Mar 26, 2025 4:05 pm

maxen13126 wrote:There seems to be a logic behind that all: the sBSpline shows the exact same behaviour. It's as if the published points are somehow disconnected from the objects.


Ok, I found some more time so I gave it another go. I don't normally do motion graphics and virtually never did I do a call out mograph so I had to look it up to see how they animate. Not sure if this is what you wanted, but here is what I got.

sshot-969.jpg
sshot-969.jpg (216.62 KiB) Viewed 1094 times


In regular polgyon or B-spline you have center position or you can add transform node with center position because X and Y axis splines are combined to a displacement spline. So its easy to connect publish polygon points to individual elements in the composition.

In shape system you have x and y, so you can do the same but you have to modify published polygon points with x and y path first. Than you can connect x of publish point to X of shape element in the composition and same for Y.

Here I've done it for the triangle elbow position and ellipse while I left he 0 point as it s to be underline for the text. Not sure if that is what you wanted.

Code: Select all
{
   Tools = ordered() {
      Callout_sTxt = sText {
         NameSet = true,
         Inputs = {
            Center = Input { Value = { -0.214002642007926, 0.0250990752972259 }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            StyledText = Input { Value = "CallOut Text Input", },
            Font = Input { Value = "Bahnschrift", },
            Style = Input { Value = "Light SemiCondensed", },
            Size = Input { Value = 0.053, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { -178.503, 15.6078 } },
      },
      Callout_ElbowPosX = sNGon {
         NameSet = true,
         Inputs = {
            Sides = Input { Value = 3, },
            Solid = Input { Value = 0, },
            BorderWidth = Input { Value = 0.001, },
            ["Translate.X"] = Input {
               SourceOp = "XYPath1X",
               Source = "Value",
            },
            ["Translate.Y"] = Input {
               SourceOp = "XYPath1Y",
               Source = "Value",
            },
            Width = Input { Value = 0.0626508165167602, },
            Height = Input { Value = 0.0626508165167602, },
            Angle = Input { Value = -90, }
         },
         ViewInfo = OperatorInfo { Pos = { -178.503, 48.6078 } },
      },
      XYPath1X = BezierSpline {
         SplineColor = { Red = 255, Green = 0, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [227] = { 0.126168224299065 }
         }
      },
      XYPath1Y = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [227] = { -0.0196261682242991 }
         }
      },
      sRender2 = sRender {
         Inputs = {
            GlobalOut = Input { Value = 486, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Input = Input {
               SourceOp = "sMerge2",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 56.831, 81.6078 } },
      },
      sMerge2 = sMerge {
         Inputs = {
            Input1 = Input {
               SourceOp = "sPolygon1",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "CalloutDot_sEllipse",
               Source = "Output",
            },
            Input4 = Input {
               SourceOp = "Callout_ElbowPosX",
               Source = "Output",
            },
            Input3 = Input {
               SourceOp = "Callout_sTxt",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { -68.5026, 81.6078 } },
      },
      CalloutDot_sEllipse = sEllipse {
         NameSet = true,
         Inputs = {
            Solid = Input { Value = 0, },
            BorderWidth = Input { Value = 0.001, },
            ["Translate.X"] = Input {
               SourceOp = "XYPath2X",
               Source = "Value",
            },
            ["Translate.Y"] = Input {
               SourceOp = "XYPath2Y",
               Source = "Value",
            },
            Width = Input { Value = 0.0380175074962881, },
            Height = Input { Value = 0.0380175074962881, }
         },
         ViewInfo = OperatorInfo { Pos = { -181.169, 81.6078 } },
      },
      XYPath2X = BezierSpline {
         SplineColor = { Red = 255, Green = 77, Blue = 0 },
         NameSet = true,
         KeyFrames = {
            [227] = { 0.347726515142162 }
         }
      },
      XYPath2Y = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 76 },
         NameSet = true,
         KeyFrames = {
            [227] = { 0.143259793330782 }
         }
      },
      sPolygon1 = sPolygon {
         DrawMode = "ModifyOnly",
         CtrlWZoom = false,
         Inputs = {
            Solid = Input { Value = 0, },
            BorderWidth = Input { Value = 0.005, },
            Polyline = Input {
               SourceOp = "sPolygon1Polyline",
               Source = "Value",
            },
            Point0 = Input { Value = { -0.35607476635514, -0.0177570093457944 }, },
            Point1 = Input {
               SourceOp = "XYPath1",
               Source = "Value",
            },
            Point2 = Input {
               SourceOp = "XYPath2",
               Source = "Value",
            }
         },
         ViewInfo = OperatorInfo { Pos = { -89.8361, 125.244 } },
      },
      sPolygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [227] = { 0, Flags = { LockedY = true }, Value = Polyline {
                  Points = {
                     { Linear = true, Tagged = true, X = -0.35607476635514, Y = -0.0177570093457944, RX = 0.160747663551402, RY = -0.000623052959501557, PublishID = "Point0" },
                     { Linear = true, Tagged = true, X = 0.126168224299065, Y = -0.0196261682242991, LX = -0.160747663551402, LY = 0.000623052959501557, RX = 0.0738527636143656, RY = 0.0542953205183603, PublishID = "Point1" },
                     { Linear = true, Tagged = true, X = 0.347726515142162, Y = 0.143259793330782, LX = -0.0738527636143656, LY = -0.0542953205183603, PublishID = "Point2" }
                  }
               } }
         }
      },
      XYPath1 = XYPath {
         ShowKeyPoints = false,
         DrawMode = "ModifyOnly",
         Inputs = {
            X = Input {
               SourceOp = "XYPath1X",
               Source = "Value",
            },
            Y = Input {
               SourceOp = "XYPath1Y",
               Source = "Value",
            }
         },
      },
      XYPath2 = XYPath {
         ShowKeyPoints = false,
         DrawMode = "ModifyOnly",
         CtrlWZoom = false,
         Inputs = {
            X = Input {
               SourceOp = "XYPath2X",
               Source = "Value",
            },
            Y = Input {
               SourceOp = "XYPath2Y",
               Source = "Value",
            }
         },
      }
   }
}
Offline

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

Re: driving the points of a sPolygon by expressions

PostThu Mar 27, 2025 7:50 am

Does the spline point follow the ellipse on your system? When I move the ellipse, the spline stays unaltered.
As I move the spline point, the ellipse will follow. I already achieved that - but I need it the other way round. Because I want the point1 always in the Y-postion of the point0, so the line below the text stays horizontal.
For now I just use regular nodes, so it's not a big problem but more of a thing of interest.
Offline
User avatar

KrunoSmithy

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

Re: driving the points of a sPolygon by expressions

PostThu Mar 27, 2025 3:28 pm

Actually it doesn't. Didn't think of that. Usually outside the shape system, when you publish something and connect to it, they are linked and one changes the other, so I didn't think of trying that out until you said it.
Offline

maxen13126

  • Posts: 124
  • Joined: Fri Sep 11, 2020 10:51 am
  • Real Name: Alexander Boehm

Re: driving the points of a sPolygon by expressions

PostFri Mar 28, 2025 9:33 am

Anyway, thanks for taking time investigating into this.

Return to Fusion

Who is online

Users browsing this forum: RobertK and 22 guests