Jump to: Board index » General » Fusion

Can you make an object follow a text length?

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

j3imes

  • Posts: 2
  • Joined: Mon Mar 11, 2024 4:39 am
  • Real Name: Guilherme Corrêa

Can you make an object follow a text length?

PostMon Mar 11, 2024 4:46 am

Can you make an object follow a text length?
I'm trying to make and shape (green triangle) follow the end of a text every time i change the text on fusion, i want it to change its position based on the length of the text, is that a possible thing to do with expressions or do i have to do it by hand?
Attachments
Captura de tela 2024-03-11 014303.png
The text and the shape in question, i want the shape to always stay in the end of the text every time i change it
Captura de tela 2024-03-11 014303.png (13.87 KiB) Viewed 466 times
Offline

Sander de Regt

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

Re: Can you make an object follow a text length?

PostMon Mar 11, 2024 9:22 pm

It's definitely doable with some expression work, but it does depend on the rest of your setup on how to approach it. If the 'Alta de 0,41%'is in its own text+ tool, it works differently than if you have a multiline setup. You could also add a single 'square' character at the end of your line and use the Character Level Style modifier with shading set to bitmap and then use the image of our green shape, so that the last 'character' of your line is always the green triangle. But again, it all depends on your setup.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Sander de Regt

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

Re: Can you make an object follow a text length?

PostMon Mar 11, 2024 9:27 pm

Code: Select all
{
   Tools = ordered() {
      Text1 = TextPlus {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            Enabled2 = Input { Value = 1, },
            Softness1 = Input { Value = 1, },
            StyledText = Input {
               SourceOp = "CharacterLevelStyling1",
               Source = "StyledText",
            },
            Font = Input { Value = "Arial", },
            Style = Input { Value = "Narrow", },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            ElementShape2 = Input { Value = 2, },
            Type2 = Input { Value = 1, },
            ColorImage2 = Input {
               SourceOp = "sRender1",
               Source = "Output",
            },
            Softness2 = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 220, -16.5 } },
      },
      CharacterLevelStyling1 = StyledTextCLS {
         CtrlWZoom = false,
         Inputs = {
            TransformRotation = Input { Value = 1, },
            SelectElement = Input { Value = 1, },
            Softness = Input { Value = 1, },
            Extrusion = Input { Value = 1, },
            Text = Input { Value = "- Alta de 50,50% M", },
            CharacterLevelStyling = Input {
               Value = StyledText {
                  Array = {
                     { 2010, 17, 17, Value = 2 },
                     { 2300, 17, 17 },
                     { 2400, 17, 17, Value = 1 },
                     { 2000, 17, 17, Index = 1, Value = 1 },
                     { 2400, 17, 17, Index = 1, Value = 1 },
                     { 2000, 0, 15, Index = 1 }
                  }
               },
            },
         },
      },
      sRender1 = sRender {
         Inputs = {
            Width = Input { Value = 64, },
            Height = Input { Value = 64, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Input = Input {
               SourceOp = "sNGon1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 49.5 } },
      },
      sNGon1 = sNGon {
         Inputs = {
            Sides = Input { Value = 3, },
            ["Translate.Y"] = Input { Value = -0.056, },
            Width = Input { Value = 0.6, },
            Height = Input { Value = 0.6, },
            Angle = Input { Value = -30, },
            Red = Input { Value = 0, },
            Blue = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 49.5 } },
      }
   }
}

Like this for example
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

j3imes

  • Posts: 2
  • Joined: Mon Mar 11, 2024 4:39 am
  • Real Name: Guilherme Corrêa

Re: Can you make an object follow a text length?

PostMon Mar 11, 2024 10:10 pm

Sander de Regt wrote:It's definitely doable with some expression work, but it does depend on the rest of your setup on how to approach it. If the 'Alta de 0,41%'is in its own text+ tool, it works differently than if you have a multiline setup. You could also add a single 'square' character at the end of your line and use the Character Level Style modifier with shading set to bitmap and then use the image of our green shape, so that the last 'character' of your line is always the green triangle. But again, it all depends on your setup.


Hey, i actually didn't knew about the "Character Level Style" :v, i'm kinda new to fusion, but it seems to work fine for what i am currently doing, i have a setup where i have different text nodes and two triangles of different colors for each text node, where i would change the triangle depending on the text, they also have little keyframe animations on opacity and position (in this case, they wold go up or down), i just wanted a way to easily edit the text without having to change the position of the triangle each time so that it stays at the end of the text.

Thanks for the help!

Return to Fusion

Who is online

Users browsing this forum: No registered users and 37 guests