Jump to: Board index » General » Fusion

Shapes – attaching sNGon to sPolygon in Animation

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

vinzent

  • Posts: 4
  • Joined: Thu Jan 25, 2024 7:47 pm
  • Real Name: Christian Wetzel

Shapes – attaching sNGon to sPolygon in Animation

PostThu Jan 25, 2024 7:53 pm

Hello,

I want to create a coordinate system consisting of x and y axes with two sPolygons as lines and two sNGons (triangles) as arrows. The two axes should build up over ~ 12 frames using the "length" parameter from 0 to 1, and the sNGons should each follow along connected to the end of the line.

After numerous unsuccessful attempts, playing around with the Offset-parameters, I gave up and animated everything with keyframes. Now I would like to know if there is an (elegant) way to link the animated endpoint of a sPolygon line to the coordinates of a sNGon.
Attachments
coordinate system.gif
coordinate system.gif (78.87 KiB) Viewed 889 times
Offline

Sander de Regt

  • Posts: 3591
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Shapes – attaching sNGon to sPolygon in Animation

PostFri Jan 26, 2024 6:23 am

From the top of my head, you could see if the vector modifier will work with these tools. That would be my choice with traditional polylines. I am not behind my Fusion system right now, so I can't check.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

vinzent

  • Posts: 4
  • Joined: Thu Jan 25, 2024 7:47 pm
  • Real Name: Christian Wetzel

Re: Shapes – attaching sNGon to sPolygon in Animation

PostFri Jan 26, 2024 3:22 pm

Hello Sander de Regt,
I was not able to get the Vector Result modifier to work. It would help a lot, if you give me another hint.
Offline

Sander de Regt

  • Posts: 3591
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Shapes – attaching sNGon to sPolygon in Animation

PostFri Jan 26, 2024 4:00 pm

I understand. I noticed that the modifiers are different between regular masks and shapes.
Shapes have seperate x/y screw controls, and they are not supported by the vector modifier.

There are some things you can do to make this work, but they're a bit of a workaround.
Personally I would do them with the regular masking tools, because I'm more familiar with those, but there are couple of ways to be smart about this in the shapes as well.

It involves in animating first from a neutral position (0,0) and then using a sTransform to put everything where you want it to be. It also involves some calculation modifiers etc. but it is definitely doable.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Sander de Regt

  • Posts: 3591
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Shapes – attaching sNGon to sPolygon in Animation

PostFri Jan 26, 2024 4:23 pm

Here's something that works for me. It took about 7 minutes to set up.

Code: Select all
{
   Tools = ordered() {
      Y_Axis = sPolygon {
         DrawMode = "ModifyOnly",
         NameSet = true,
         Inputs = {
            BorderWidth = Input { Value = 0.005, },
            WriteLength = Input {
               SourceOp = "X_AxisLength",
               Source = "Value",
            },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = 0, Y = 0, RX = 0, RY = 0.0833333333333333 },
                     { Linear = true, X = 0, Y = 0.25, LX = 0, LY = -0.0833333333333333 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 49.5 } },
      },
      X_AxisLength = BezierSpline {
         SplineColor = { Red = 141, Green = 167, Blue = 243 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 4, 0.333333333333333 }, Flags = { Linear = true } },
            [12] = { 1, LH = { 8, 0.666666666666667 }, Flags = { Linear = true } }
         }
      },
      X_Axis = sPolygon {
         DrawMode = "ModifyOnly",
         NameSet = true,
         Inputs = {
            BorderWidth = Input { Value = 0.005, },
            WriteLength = Input {
               SourceOp = "X_AxisLength",
               Source = "Value",
            },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = 0, Y = 0, RX = 0.0833333333333333, RY = 0 },
                     { Linear = true, X = 0.25, Y = 0, LX = -0.0833333333333333, LY = 0 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 16.5 } },
      },
      X_AxisArrowhead = sNGon {
         NameSet = true,
         Inputs = {
            Sides = Input { Value = 3, },
            ["Translate.X"] = Input {
               SourceOp = "Calculation1",
               Source = "Result",
            },
            Width = Input {
               SourceOp = "Y_AxisArrowheadHeight",
               Source = "Value",
            },
            Height = Input {
               SourceOp = "Y_AxisArrowheadHeight",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 82.5 } },
      },
      Calculation1 = Calculation {
         CtrlWZoom = false,
         Inputs = {
            FirstOperand = Input {
               SourceOp = "X_AxisLength",
               Source = "Value",
            },
            Operator = Input { Value = 3, },
            SecondOperand = Input { Value = 4, },
         },
      },
      Y_AxisArrowheadHeight = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 255 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 0.666666666666667, 0.00666666666666667 }, Flags = { Linear = true } },
            [2] = { 0.02, LH = { 1.33333333333333, 0.0133333333333333 }, Flags = { Linear = true } }
         }
      },
      sMerge1 = sMerge {
         Inputs = {
            Input1 = Input {
               SourceOp = "X_Axis",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "Y_Axis",
               Source = "Output",
            },
            Input3 = Input {
               SourceOp = "X_AxisArrowhead",
               Source = "Output",
            },
            Input4 = Input {
               SourceOp = "Y_AxisArrowhead",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 49.5 } },
      },
      sTransform1 = sTransform {
         CtrlWZoom = false,
         Inputs = {
            XOffset = Input { Value = -0.409326424870466, },
            YOffset = Input { Value = -0.398963730569948, },
            Input = Input {
               SourceOp = "sMerge1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 440, 49.5 } },
      },
      Y_AxisArrowhead = sNGon {
         NameSet = true,
         Inputs = {
            Sides = Input { Value = 3, },
            ["Translate.Y"] = Input {
               SourceOp = "Calculation1_1",
               Source = "Result",
            },
            Width = Input {
               SourceOp = "Y_AxisArrowheadWidth",
               Source = "Value",
            },
            Height = Input {
               SourceOp = "Y_AxisArrowheadHeight",
               Source = "Value",
            },
            Angle = Input { Value = 90, },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 115.5 } },
      },
      Calculation1_1 = Calculation {
         CtrlWZoom = false,
         Inputs = {
            FirstOperand = Input {
               SourceOp = "CalculationonX_AxisArrowhead_1FirstOperand",
               Source = "Value",
            },
            Operator = Input { Value = 3, },
            SecondOperand = Input { Value = 4, },
         },
      },
      CalculationonX_AxisArrowhead_1FirstOperand = BezierSpline {
         SplineColor = { Red = 141, Green = 167, Blue = 243 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 4, 0.333333333333333 }, Flags = { Linear = true } },
            [12] = { 1, LH = { 8, 0.666666666666667 }, Flags = { Linear = true } }
         }
      },
      Y_AxisArrowheadWidth = BezierSpline {
         SplineColor = { Red = 225, Green = 255, Blue = 0 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 0.666666666666667, 0.00666666666666667 }, Flags = { Linear = true } },
            [2] = { 0.02, LH = { 1.33333333333333, 0.0133333333333333 }, Flags = { Linear = true } }
         }
      },
      sRender1 = sRender {
         Inputs = {
            GlobalOut = Input { Value = 20, },
            Width = Input { Value = 1080, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Input = Input {
               SourceOp = "sTransform1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 49.5 } },
      }
   }
}
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

vinzent

  • Posts: 4
  • Joined: Thu Jan 25, 2024 7:47 pm
  • Real Name: Christian Wetzel

Re: Shapes – attaching sNGon to sPolygon in Animation

PostSat Jan 27, 2024 8:19 pm

Thank you,
this is very helpful.
Offline

Ashley Thomas

  • Posts: 84
  • Joined: Sat May 04, 2019 4:11 am
  • Real Name: Ashley Thomas

Re: Shapes – attaching sNGon to sPolygon in Animation

PostFri Feb 23, 2024 4:45 am

vinzent wrote:I want to create a coordinate system consisting of x and y axes with two sPolygons as lines and two sNGons (triangles) as arrows. ... I would like to know if there is an (elegant) way to link the animated endpoint of a sPolygon line to the coordinates of a sNGon.
Sander de Regt wrote:Here's something that works for me. It took about 7 minutes to set up. ...
Great question, great answer... whoa... trying to recreate your example from scratch was non-trivial but I generally do not have to publish and/or connect so many things up like that... so there were a number of "ah ha" moments and it got me to look into all of the "Modify With" options... had not used many of those before.

To clean up things, I found I had to export to .settings, edit it... was able to rename some values and remove some points from earlier testing ... apparently unused items are not always removed, I'm guessing for some good reason.

For non-sShapes, there are docs to give examples to hook up things, including heading, but seems like sShapes require a differing nuanced effort... correct me if I read incorrectly above... I found this thread after not having luck trying to apply non-sShape approaches to sShape path animation, keeping a shape connected to a write-on path.

Anyway, thank you both!

Return to Fusion

Who is online

Users browsing this forum: Bing [Bot], KrunoSmithy and 49 guests