5 Replies Latest reply on Jul 22, 2009 1:01 PM by oldarney

    Dinamically increase position.

    oldarney

      am moving some clips around the screen in a loop. I want those clips to move faster, then slow back down without affecting the playback speed within the clips.

       

      I figure that the best way to achieve this is to

      1. set a slider effect on a null object

      2. set the slider to have an interval representing the speed that the clips will move.

      3. Have an expression increment the position of the clips by the interval set in the slider each frame.

      4. animate the slider manually to make the clips speed up and slow down.

       

      for example. (i would add this to the clips, don't mind if they go off screen, i can handle that)
      MySlider+transform.xPosition.valueAtTime(time-1*thisComp.frameDuration);

        • 1. Re: Dinamically increase position.
          Mylenium Most Valuable Participant

          I'm not sure what you are getting at, honestly. Why even fiddle with expressions? You could just as well animate this manually, then throw on a "LoopOut" expression at best to make it repeat infinitely. or is there time-remapping involved anywhere? this could complicate things...

           

          Mylenium

          • 2. Re: Dinamically increase position.
            David Wigforss-Hv1BNN Level 2
            1  5  9  13  17  21  25 (my original positions)
            My Variables:
            StartPosX    (Like 1, above; this is a fixed number that you manually enter)
            OrigPosX     (Like 1,5,9,13, etc; Slider containing original position keyframes)
            Speed         (like 1, or .5, etc; you can link this to a slider to dynamically conrol speed)
            (StartPosX+((OrigPosX-StartPosX)*Speed)
            If Speed is .5, above would be 1 3 5 7 9 11
            I use that quite often; I've emailed it to myself for reference.  This is very useful for doing parallax animation, where the fg moves fast and the bg moves slow.
            1 person found this helpful
            • 3. Re: Dinamically increase position.
              oldarney Level 1

              Thats using existing keyframes, isn't there a way to do it from scratch? i find it strange that i have to put keyframes to make something increase by a variable interval.

              • 4. Re: Dinamically increase position.
                Mylenium Most Valuable Participant

                Well, you have to keyframe something or how else do you expect your formula to respond to your timing? Even if you dial in a specific speed, your object still needs to know where it is supposed to end up spatially. Unless that definition is parametric as well, there's no way for it to know... And then again it becomes an academic question: Is keyframing a slider more efficient than keyframing the position directly? No offense, but I really think you are creating a problem where none exists.

                 

                Mylenium

                • 5. Re: Dinamically increase position.
                  oldarney Level 1

                  im moving it with a script... thats the whole point of this thread, moving something with a script and changing the speed at which it moves throught the course of the script.