Jump to: Board index » General » Fusion

Dynamically change a keyframe position?

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

JLapinskas

  • Posts: 3
  • Joined: Sat Aug 27, 2022 11:58 pm
  • Real Name: Jon Lapinskas

Dynamically change a keyframe position?

PostFri Sep 23, 2022 2:24 pm

I created a lower third where "Your text here" is on the screen and an image of a circular saw flies in from the left, slows down at the text, sparks fly like it's cutting the text (pEmitter), and at the end of the text the sparks stop, the saw accelerates off the screen and the text falls away like the saw cut it. It's actually pretty cool looking and works great. However, if I change the text I have to manually redo the keyframes so the sparks stop and the acceleration of the saw off the screen starts at the new end of the text. Is it possible to parameterize this end keyframe position so that it's dynamically set based on the width of the text? I can get the width of the text area with (Text1.Output[0].DataWindow[3]-Text1.Output[0].DataWindow[1])/Text1.Output[0].Width+.1, but I'm not sure how I can use this to change the position of a keyframe on the fly. Or maybe I should be looking at solving this completely differently.
Offline

JLapinskas

  • Posts: 3
  • Joined: Sat Aug 27, 2022 11:58 pm
  • Real Name: Jon Lapinskas

Re: Dynamically change a keyframe position?

PostMon Sep 26, 2022 4:55 pm

I was able to solve this, but not using a dynamic keyframe position. I created an if statement in the pEmitter Number field that checks to see if the width of the text is greater than position of the saw (I moved the saw position using Merge2.Center.X). If yes, emit 5 particles per frame; if no then don't emit any particles. This causes the "sparks" to stop at the end of the word and it works well. Here's the statement for reference:

iif((Text1.Output[0].DataWindow[3]-Text1.Output[0].DataWindow[1])/Text1.Output[0].Width+.05 > Merge2.Center.X, 5, 0)

I'm sure there are other more elegant ways to get the same outcome, but this seemed to get the job done. Now I can reuse this effect with any size word without redoing any keyframes.

Return to Fusion

Who is online

Users browsing this forum: Frank Engel, Hendrik Proosa and 19 guests