Jump to: Board index » General » Fusion

Dashed lines?

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

Rich Turner

  • Posts: 10
  • Joined: Thu Mar 07, 2013 7:16 am

Dashed lines?

PostMon Jul 17, 2017 3:34 am

Hi all, is there a way to draw a spline, set thickness (border width) and then make it dashed? I want a dotted line for a motion graphic I am creating.

Cheers

Rich
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: Dashed lines?

PostMon Jul 17, 2017 6:06 am

Hi Rich - try the paint tool and then play with the brush size and the spacing (under stroke controls). Simple example below:

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 84, 115 } },
      },
      Paint1 = Paint {
         CtrlWZoom = false,
         Inputs = {
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Paint = Input {
               SourceOp = "PolylineStroke1",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 235, 116 } },
      },
      PolylineStroke1 = PolylineStroke {
         Points = {
         },
         IsThreaded = false,
         Brushes = { "SoftBrush" },
         ApplyModes = { "PaintApplyColor" },
         Inputs = {
            BrushControls = Input { Value = 1, },
            ["SoftBrush.Softness"] = Input { Value = 0.001, },
            StrokeControls = Input { Value = 1, },
            Spacing = Input { Value = 2, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.304166674613953, Y = 0.277777791023254, RX = 0.145138891537984, RY = -0.00123457231639346 },
                     { X = 0.131249994039536, Y = 0.274074077606201, LX = -0.100000005960468, LY = 0.203703707235825, RX = 0.0754309715546236, RY = -0.153655676302181 },
                     { X = 0.147916659712791, Y = -0.337037026882172, LX = 0.0293821529406838, LY = 0.228727714093096, RX = -0.137499997682042, RY = 0.0271604904422054 },
                     { Linear = true, X = -0.264583319425583, Y = -0.25555557012558, LX = 0.137499997682042, LY = -0.0271604904422054 }
                  }
               },
            },
         },
      }
   }
}
www.ablackbirdcalledsue.com
Offline

Sander de Regt

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

Re: Dashed lines?

PostMon Jul 17, 2017 7:15 am

Hi Rich,

You can also use the Text+ tool, set the layout to path and use a polyline to create your line.
Then use whatever kind of character you like - _ = + to create the dashes.

Code: Select all
{
   Tools = ordered() {
      Text1 = TextPlus {
         Inputs = {
            GlobalOut = Input { Value = 100, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            LayoutType = Input { Value = 3, },
            PositionOnPath = Input { Value = 0.555794, },
            Font = Input { Value = "Open Sans", },
            StyledText = Input { Value = "---------------------------------------------------", },
            Style = Input { Value = "Bold", },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = ""
               },
            },
            ShadingGradient1 = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
            Path = Input {
               SourceOp = "Polygon1Polyline",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 84, 22.5 } },
      },
      Polygon1Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 15, 0.333333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Points = {
                     { X = -0.268533766269684, Y = -0.275988280773163, RX = -0.0474839497485646, RY = 0.138381917352732 },
                     { X = -0.366556823253632, Y = 0.155929714441299, LX = 0.00305515748681855, LY = -0.155154160508998, RX = -0.00142628491494644, RY = 0.0724329398991487 },
                     { X = -0.280065894126892, Y = 0.309663236141205, LX = -0.0407597809001258, LY = 0.00149764458280648, RX = 0.0833951313740135, RY = -0.00306420358442948 },
                     { X = -0.0477759465575218, Y = 0.144216686487198, LX = -0.0483485438924347, LY = 0.120838382748492, RX = 0.0485103161683453, RY = -0.121242703098616 },
                     { X = 0.0947281718254089, Y = -0.223279654979706, LX = -0.0834929835533686, LY = 0.0102556159186119, RX = 0.105675708167131, RY = -0.0129803658794475 },
                     { X = 0.357495874166489, Y = 0.0944363102316856, LX = -0.0588690054520404, LY = -0.156556593646817, RX = 0.0216906963270939, RY = 0.0576843706585781 },
                     { X = 0.363261938095093, Y = 0.302342593669891, LX = 0.0384258943287846, LY = -0.0122284206484323 }
                  }
               } },
            [45] = { 1, LH = { 30, 0.666666666666667 }, RH = { 63.3333333333333, 1.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Points = {
                     { X = -0.342298181426191, Y = 0.0461932712034112, RX = -0.00306889245114459, RY = 0.0471140378175594 },
                     { X = -0.331342655214093, Y = 0.136163975056234, LX = -0.0170933111143876, LY = 0.00425737178229639, RX = 0.0478273896985908, RY = -0.0119122022621051 },
                     { X = -0.204448101705146, Y = 0.0118594294062121, LX = -0.0448219557073808, LY = 0.0319678711238914, RX = 0.0622935320142141, RY = -0.0444289315772644 },
                     { X = -0.0092256994405531, Y = -0.0758418786665357, LX = -0.057247794529255, LY = 0.0622917181194839, RX = 0.0378079505731628, RY = -0.0411390904950114 },
                     { X = 0.0947281718254089, Y = -0.223279654979706, LX = -0.0428067156774009, LY = -0.0204653028524544, RX = 0.0823341666159159, RY = 0.039362834271089 },
                     { X = 0.291231884846761, Y = 0.0678027658583177, LX = -0.0459499610576252, LY = -0.127675715987278, RX = 0.0169345170349546, RY = 0.047053937317272 },
                     { X = 0.295873971745932, Y = 0.235181942807126, LX = 0.0228344705456172, LY = -0.0255235066573985 }
                  }
               } },
            [100] = { 2, LH = { 81.6666666666667, 1.66666666666667 }, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Points = {
                     { X = -0.4324546888397, Y = 0.439970723619224, RX = 0.0599937907333758, RY = -0.098024292097033 },
                     { X = -0.288303116499101, Y = 0.112005849141153, LX = -0.0465124022281755, LY = 0.111407892790603, RX = 0.0625814908144368, RY = -0.149897052943601 },
                     { X = -0.1120263554119, Y = -0.352123001047668, LX = -0.0824854546348501, LY = 0.115514041321297, RX = 0.0392705720031612, RY = -0.054995180631126 },
                     { X = 0.0378912692579642, Y = -0.344802347187766, LX = -0.0439948896894927, LY = -0.0422044850186523, RX = 0.0260785260898108, RY = 0.0250172411258214 },
                     { X = 0.0947281718254089, Y = -0.223279654979706, LX = -0.0184540081327672, LY = -0.0412186075072296, RX = 0.0385522339239696, RY = 0.0861097159601568 },
                     { X = 0.210242564567093, Y = 0.0352506560686458, LX = -0.0318902104982508, LY = -0.0943295756886536, RX = 0.0113963573048747, RY = 0.0337098291973984 },
                     { X = 0.213510901763625, Y = 0.153096702863745, LX = 0.00377828592174581, LY = -0.0417730562239128 }
                  }
               } }
         }
      },
      Polygon1 = PolylineMask {
         DrawMode = "ModifyOnly",
         DrawMode2 = "InsertAndModify",
         CtrlWZoom = false,
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               SourceOp = "Polygon1Polyline",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 81, 104 } },
      }
   }
}
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Rich Turner

  • Posts: 10
  • Joined: Thu Mar 07, 2013 7:16 am

Re: Dashed lines?

PostMon Jul 17, 2017 7:28 am

Excellent, thanks guys, ahh yes I remember using the txt tool Sander. thanks for that. it's been a while and these things may take a while to come back to me.

cheers

Rich

Return to Fusion

Who is online

Users browsing this forum: No registered users and 35 guests