3 Replies Latest reply on Sep 3, 2017 9:43 PM by Roei Tzoref

    How to loop a composition within a composition in ( not a movie ) After Effects ?


      Dear all,


      I'm on a mac trying to learn after effects.

      I'm trying to make a very simple stopmotion of 30 sec. Writing with a squiggly line 

      I want to learn this because when I do bigger projects I can easily loop things like walking sequences or blinking eyes within a long movie.

      Maybe because I'm used to animating in flash maybe i'm thinking wrong, looping like a movie-clip.


      Schermafbeelding 2014-09-25 om 03.17.18.png


      I've made a jpg sequence by hand of 4 images, because i can control how long each image will last. In my case I choose 1 image = 3 frames. I did this because I don't want it to be hyper active fast. The jpg sequence now lasts about 12 frames, I named it day3. Because it's so short to fill a 30 sec movie I want to loop it for a duration of 30 sec.


      Schermafbeelding 2014-09-25 om 03.10.18.png


      I tried placing my composition day3 within a new composition named nervous with a duration of 30sec. By pressing enable time mapping hoping this would work but it does not.

      I also tried finding the Expression Language menu, because someone said it would help but it's nowhere to be found. I found it odd that my time line in the main composition nervous displayed frames instead of seconds.


      Schermafbeelding 2014-09-25 om 02.55.30.png


      Can someone help me with this?

      Thank you so much

        • 1. Re: How to loop a composition within a composition in ( not a movie ) After Effects ?
          Szalam Adobe Community Professional & MVP

          I don't understand your question about frames vs. seconds.

          You can either sequence copies of your precomposition over and over to loop it or you can use a loopOut() expression on the Time Remapping value (you will also have to extend the layer).

          I highly recommend going through these resources: Getting started with After Effects That set covers all the questions you've had so far and probably many others you didn't know you had.

          • 2. Re: How to loop a composition within a composition in ( not a movie ) After Effects ?
            Rick Gerard Adobe Community Professional & MVP

            As Szalam said, pre-compose, time remap, and the use a loopOut() expression.


            Here's the steps in detail.

            First make sure you comp is exactly the right length to make a perfect loop. This means the last frame of the comp must perfectly line up with the first frame of the comp. You can test the loop by doing a RAM preview with the Loop option enabled in the Preview Panel. When your loop is perfect it's time to pre-compose. Make sure you move all attributes to the new comp.


            Now you must change the duration of your original comp to allow time for the loop to run. Now enable time remapping. You'll see two keyframes, one at the start and one at the end. If you move to the end keyframe by pressing the K key you'll see that there is no image. Use the page up key to move back one frame and manually set a new keyframe. Delete the last keyframe now. Pressing the J and K key should now show you the first and last visible frame. Now extent the out point of the pre-comp by going to the last frame of the composition, select the pre-comp layer and then press Alt/Option + ] to set a new out point. Now hold down the Alt/Option key and click on the stopwatch for Time Remapping and type in loopOut() and your'e done. You can also use loopOut("cycle"), cycle is the default, or type in loopOut("pingpong") which will make the comp play frontwards then backwards, then frontwards. There are also some other properties you can include in the brackets but let's not get into that now.


            There you go. EZ as pie once you know what you are doing.

            1 person found this helpful
            • 3. Re: How to loop a composition within a composition in ( not a movie ) After Effects ?
              Roei Tzoref Adobe Community Professional

              if you want a perfect loop you need not to delete the last keyframe, but instead, copy the first keyframe over the last keyframe.


              if you not do copy paste the first keyframe to replace the original last kf, you will always miss the first frame that will accumulate in time with every loop.



              say you have one second precomp, so setting a keyframe one frame before the last keyframe and deleting the last keyframe will result in this:
              1 – 00:00-01:00
              2 – 00:01-01:00

              as time progresses this delay will miss a frame each loop…

              you can see a drift you duplicated your precomp over and over back to back and place it below your TR precomp to compare

              as opposed to setting a keyframe one frame before the last keyframe and copying the first keyframe instead of the original last keyframe which will result in this:
              1- 00:00-01:00
              2 – 00:00-01:00

              and will be exactly like you pasted your precomp over and over back to back.