Page 1 of 1

Question about 2D animation

PostPosted: Tue May 15, 2018 7:42 am
by capsee
Hi, I'm new to Fusion. I need to animate shape as shown in attachment. I've tried to use PolylineStroke whith square brush, but the line wasn't that smooth as in the picture. Does anybody has some ideas?

Re: Question about 2D animation

PostPosted: Wed May 23, 2018 2:27 am
by julian_b
In case you still need it:

How's this?:
Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 519, },
            Height = Input { Value = 577, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 275, 148.5 } },
      },
      Paint1 = Paint {
         Inputs = {
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Paint = Input {
               SourceOp = "PolylineStroke1",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 275, 280.5 } },
      },
      PolylineStroke1 = PolylineStroke {
         Points = {
         },
         IsThreaded = false,
         Brushes = {
            "SoftBrush",
            "CircleBrush",
            "RectBrush"
         },
         ApplyModes = { "PaintApplyColor" },
         CtrlWZoom = false,
         Inputs = {
            BrushControls = Input { Value = 1, },
            BrushShape = Input { Value = FuID { "CircleBrush" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.488157898187637, Y = -0.39218008518219, RX = 0.0526315800976335, RY = -0.0548973175775006 },
                     { X = -0.211842104792595, Y = -0.485781997442245, LX = -0.107790123771413, LY = -0.00470960529918013, RX = 0.172410661849301, RY = 0.0100710928612598 },
                     { X = 0.0994588624038735, Y = -0.307072809031431, LX = -0.0525388001387972, LY = -0.0838509911346657, RX = 0.0853507977716777, RY = 0.136218326055603 },
                     { X = 0.0426396066644741, Y = 0.0669634625698378, LX = 0.0779429580708211, LY = -0.067794224887584, RX = -0.0686094983461535, RY = 0.0596760512085112 },
                     { X = -0.0321243365148181, Y = 0.333218519580308, LX = -0.0381265133875498, LY = -0.100234713265782, RX = 0.0443688023894548, RY = 0.116645706408985 },
                     { X = 0.221052631735802, Y = 0.490521341562271, LX = -0.083488240470649, LY = -0.00121930250449606, RX = 0.181140350824908, RY = -0.00236967309579646 },
                     { X = 0.488157898187637, Y = 0.248815163969994, LX = -0.00087719293017148, LY = 0.100710905323285, RX = 0.00307017428833144, RY = -0.172195891939445 },
                     { X = 0.228947371244431, Y = 0.00947867333889008, LX = 0.062719299395879, LY = -0.0102685630368584 }
                  }
               },
            },
         },
      }
   }
}

I also had trouble with the smoothness at first. That was because I broke the spline handles, they were not symmetrical.