• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
6

Using the loopOut() expression always leaves the last frame blank, no matter what I do

Community Beginner ,
May 30, 2013 May 30, 2013

Copy link to clipboard

Copied

The problem:

I've enabled Time Remapping on a composition and am using the loopOut() expression to repeat a 16 second animation until the end of the video.

When I apply the expression, it places a keyframe at the beginning of the clip and at the 16 second mark. When I look at the single frame at the 16 second mark, the composition is not visible. (The object boundaries are visible to scale/move but the image is not.) This also occurs at the 32sec mark, 48sec mark, 64sec mark...

The solution I found (that's not working for me):

  1. Create a new keyframe one frame before the 16 second mark
  2. Delete the keyframe at the 16 second mark

What happens instead:

Once I delete the keyframe at the 16 second mark, the keyframe at 15;29 becomes blank. The last keyframe will always be blank, no matter where it was placed, before or after the original.

If I have four keyframes and delete the last one (#4), the third keyframe will become blank. If I then delete the third keyframe, the second keyframe will become blank.

Any troubleshooting help would be appreciated.

TOPICS
Expressions

Views

68.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Oct 30, 2015 Oct 30, 2015

The solution to this problem, that I found, was ridiculously simple. I just had to turn on the "continuously rasterize" icon (the little star burst) next to the "shy" icon. I hope that's helpful to anyone reading this post now.

Votes

Translate

Translate
New Here ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

Thanks for taking the time to answer. This method did stop the blank frame problem on the first loop around, but at the expense of the last frame of my animation for all the subsequent loops (which start a frame early now). This knock-on effect is harder to spot than a blank frame but it is there. It still looks like a bug to me. Looping a Comp should be simple.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

This method did stop the blank frame problem on the first loop around, but at the expense of the last frame of my animation for all the subsequent loops (which start a frame early now).

this should work.

make a simple test:

move a layer from one point to the other, set the duration to match the animation and precompose. now TR the precomp with the loop out expression with the technique I described. make sure you have a long duration for the master comp.

to test it, create a copy of the TR layer and remove the expression and the TR. duplicate the layer back to back with its duplicates and see if the animation sticks.

here's the project file:

loopout.aep - Google Drive

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 11, 2017 Sep 11, 2017

Copy link to clipboard

Copied

Not a bug, user error. The last keyframe set when you enable time remapping is the time value for the entire length of the clip. If you have exactly 1 second of video in your time line then the end of the last frame is at 1 second, not the start of the last frame. If you position the CTI on the last frame of time remapping and move in to the end of the timeline you will se that this keyframe is set at the next available frame and the comp panel is now blank. All you have to do is zoom in on the timeline and look at the actual frames to see what is going on.

Move back one frame to the start of the last frame in the movie and set a keyframe. Move the CTI to that frame and you'll see something in the composition panel because in AE and every NLE the default behavior is for the time indicator to stop at the start of the last frame so you can see it, not at the start of the next to the last frame. That's why the time indicator starts at zero and the time indicator always stops one frame short of the end of a comp or a clip when you hit "o" to move to the out point.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

I watched a fix of this on YouTube which I followed to the letter. It worked the blank frame disappeared. Now when it loops I only get 23 of the 24 frames. It excludes the last frame, It's an effect the would be hard to spot without playing back frame by frame but it is there. I still think it is a bug and not 'user error'.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

All ok. End of the first loop point…

Screen Shot 2017-09-12 at 16.23.29.png

Frame before end of the next loop…

Screen Shot 2017-09-12 at 16.24.08.png

Loop starting over before the last frame…

Screen Shot 2017-09-12 at 16.24.11.png

All subsequent loops do the same. Frustrating.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

The only thing I see that is different is the white dot in the middle of the frame. I'm just looking on my phone so maybe I'm missing something.

What does the first frame look like? What does the second frame look like? I'm guessing that it has looks like the frame does at 0:00:02:00 in your last screenshot.

The loop out expression loops from the first frame after the first keyframe to the last keyframe. Using loopOut() does not repeat the first keyframe. You have to design your loop with that in mind. If you want a seamless loop using time remapping then the last frame of the animation must be identical to the first frame.

This is a change in the loopOut() behavior that happened a few versions ago. The old method required setting a keyframe one frame before the motion looped, then deleting the last keyframe and then adding loopOut(). That extra work is no longer required and makes more sense. It also solves motion blur problems that were almost impossible to fix in previous versions.

Time remapping, on the other hand sets the last keyframe at the end of the last frame, not at the beginning so to create a loop without a blank frame you have to move back one frame and set a new keyframe, delete the original last keyframe, then add loopOut(). To make a seamless loop both the first frame and the last frame of the time remapped layer must be identical.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

I found one thing that may create empty frame.
If you have frame rate 29.97 change it to 30.

That solve my problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

Just changing the frame rate is no solution. The black frame rate in a loop is caused by the placement of the last keyframe. It is as simple as that. Changing the framerate of a comp or footage is going to give you other problems. Frames are Frames and time is time. Change the frame rate of footage and you change the time it takes to playback. Change the frame rate of a comp and the time stays constant but the number of frames changes. Most folks that did not grow up shooting motion picture film do not understand how frame rates and time relate to one another.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

I do not have black frame i got blank/ empty frame like OP. And no of answers from here help me so i hope to help someone in similar situation.

If help it is a solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

The problem is that most folks do not understand what a loop is. They also do not understand or even think about why time remapping sets the last keyframe after the last frame of the footage. There is no need to, and it's a bad idea to change the frame rate of the footage to fix the black frame problem. You just have to understand how and why both of these things work the way they do.

Let's say you set up a counter that counted the frames in your clip and rendered a movie that was 10 frames long. The first frame would be 0, the second 1 and so on until you get to the tenth frame that reads 9.

Now you set up time remapping and you get a keyframe at the start of frame 1 (0) and at the end of frame 9 which is the start of frame 11 (no number displayed because the clip has ended.

Now you add the loopOut() expression. Here's what happens. LoopOut uses keyframes. There are only two. The loop starts at the first keyframe and starts repeating at the last keyframe. The blank frame problem happens because the last keyframe is set to a frame that has no content. Most folks think the loop will immediately jump to the first frame but it doesn't. It plays the last frame. The next time the loop plays the last frame is dropped. Can you figure out why? The last frame is not repeated because if it was you would add one frame to the length of the clip every time it played back. You would not have a loop. You would have a situation where the video would be the length of the loop plus 1 frame every time it looped. This is not a loop. If the last frame was not dropped and you set up a clip to loop that was one second long by the time you got to 10 seconds the timing would be off by 10 frames.

If time remapping set a keyframe at the beginning of the last frame instead of at the end of it (the start of the next frame in time) you would ever be able to change the duration of the last frame.

The solution is not to change the frame rate, which changes the time it takes the clip to play, but to use the k key to jump to the last frame set by time remapping, use Ctrl + left arrow to move back one frame, set a keyframe for time remapping at the start of the last frame, delete the last keyframe and use loopOut to generate an accurate loop. It works every time. It generates a perfect loop if the first and last frames are identical. It does not foul up the timing.

I hope that makes sense. It does to me, and setting a keyframe at the start of the last frame of the media and deleting the last keyframe always works, no matter what the frame rate.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Almost a year on and this is still the best and most clearly defined solution. It should be the top answer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

Thank you for the detailed explanations, I was pulling my hair out...

I made a visual metronome as a comp, with 4 "beats", one at 0:00, 1:00, 2:00, and 3:00 (30 fps, though fps should not matter).

The ONLY way I could get everything working (no drifting forward or backward and no blank frame at the end) was to have 1 extra frame at the end of the comp. So the duration is 4:01, but as you mentioned, the last frame is at 4:00. This is similar to your example of a 10-frame animation...you need 11 frames for a proper loop if the start and end frames are different (as mine are).

When adding it to the main comp, I want the repeats to happen at each second, frame 0. I put in the comp, set Time Remapping, and moved TWO frames back from the end to add the keyframe. I moved the last keyframe one frame back and set its time to 0 (or whatever time the first keyframe is at, in my case it starts at 0...you can copy-paste the first keyframe for this). Then I added loopOut() and extended it. Works perfectly.

I do wish I had those hours back. Very unintuitive at first and incredibly frustrating to see "off-by-one" errors all over the place. Of course, this is a special case in which the frames must match up exactly over long periods of time, whereas some other looped animations aren't so frame-critical.

I will say that having an "easy loop" feature would be very helpful. Right-click a segment in the timeline and you can turn on looping, just like in many DAWs. Semitransparent clones of the segment would fill out to the end of the comp, or there could just be an indicator that shows it's looping. It would loop the whole segment, including frame 1 of it, which to me is intuitive. Anyway, not sure if that is possible or how difficult it would be, but given the number of issues people are having with looping, it would be extremely handy.

Thanks again for your help with this!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 04, 2019 Dec 04, 2019

Copy link to clipboard

Copied

There still seems to be some bug going on. I did get this to work on one of my comps but when I try to replicate the exact same procedure on another one the following happens. 

I have a six frame precomp that I want to loop. When I do as you say (enable TR, set a keyframe on the 5th frame, delete the last keyframe), the 5th keyframe goes blank at the very moment I apply the loopOut() expression. 

When I delete the loopOut() expression, the 5th frame reappears. When I copy the first keyframe and paste it on position 6 the 5th keyframed frame goes blank as well. 

Drives me crazy!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2020 Jan 12, 2020

Copy link to clipboard

Copied

simd98821319,

Try this:

  1. Select the nested comp or the footage that you want to time remap
  2. Press Alt/Option + Cmnd/Ctrl + t to enable time remapping
  3. Press k to go to the last keyframe

If the Comp Panel shows no content then loopOut() will give you a blank frame on every loop. If the Comp Panel shows a frame then there will be no missing frame. Fix the missing frame by moving the CTI back one frame from the last time remapping keyframe and set a new keyframe, then delete the last one. You will get a loop with no missing frames. If the image at the first keyframe is identical to the image at the last keyframe you will get a seamless loop. Works every time. There is no bug. There is only some kind of user error. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 05, 2020 Feb 05, 2020

Copy link to clipboard

Copied

With all due respect, Rick_Gerard — as you obviously have a great deal of experience — there is nothing as frustrating as being dismissed by "there is only some kind of user error". The fact that you can't reproduce a bug does not mean it doesn't exist. 

 

I'll kindly divert your attention to this response in a similar thread: https://community.adobe.com/t5/after-effects/using-the-loopout-expression-always-leaves-the-last-fra...

 

I experienced the exact same issue as the thread starter, and no matter how much "looping logic" I applied, it simply would not do as described. Following your approach above to the letter, deleting the last keyframe would immediately and without fail render the frame before blank. Purging memory and disk cache solved it. No changes to the underlying composition, no changes to approach. 

 

Software has bugs. After Effects is software. Maybe we could at least entertain the notion that After Effects might have a bug or two?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 05, 2020 Feb 05, 2020

Copy link to clipboard

Copied

EDIT: removed due to duplicate post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 10, 2020 Mar 10, 2020

Copy link to clipboard

Copied

Tried every other soliution here they all did squat. Wasted so much time farting about with key frames etc.  This one worked like a charm. So simple. Why is this not the top response?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 09, 2020 May 09, 2020

Copy link to clipboard

Copied

Yeah, late to the party here but I was having the same issue and was desperate to find a solution.

 

With respect to Rick_Gerard, agreed with the responder-- it's clear that you are an expert at AfterEffects and normally your answer would be very helpful, but this is a known bug in AfterEffects. I followed your instructions to the letter and it unfortunately did not fix the issue. I would add a clue pointing to the fact that it is a bug: I had done the exact same looping procedure successfully five previous times in the same file. Suddenly, the sixth produced this blank frame. Definitely a bug!

 

FYI for future readers, I found a bizarre but simple fix in another forum that fixed the problem immediately for me: simply went to Edit > Purge> All Memory & Disk Cache...

Done and dusted! Finally!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines