Activity › Forums › Adobe After Effects › can’t get loop expression right with huge precomps
-
can’t get loop expression right with huge precomps
Posted by Danny Perez-triana on October 17, 2008 at 5:09 pmhello, i posted recently dealing with an issue of looping huge precomps cause they were making my macpro tower crash all the time.
a friendly kevin on the forum recommended using a loop expression:
https://forums.creativecow.net/readpost/2/943798
something i’m completely inexperienced with. while i’m pretty sure the project as is (precomp after precomp) is the problem not the computer (i’ve since added 8gb of ram) i can’t get the expression right?
whenever i extend the keyframe, (by this does one mean to just drag the keyframe to how long they want the loop to last? ), i get nothing. i tried with different increments from 00:00:19-00:01:00, and on and on, and the only real difference i’ll get as that the clip just gets cut off or goes by faster.
the image is just a flame against black so its easy to track.
i’m wondering if there’s one simple thing that i’m overlooking. i’ve see this expression posted before in various tutorials and such, but still am wondering: at what point do i get to set the interval for the loop
if i want the flame to go by every five frames ? and i still haven’t even managed to set one loop let alone one that goes on for 30 seconds.any help would be appreciated,
ignacio
Danny Perez-triana replied 17 years, 6 months ago 2 Members · 10 Replies -
10 Replies
-
Kevin Camp
October 17, 2008 at 6:29 pmhi ignacio,
if you just want the entire precomp to loop back from the beginning of the precomp, the steps are pretty easy:
- 1. select the precomp to loop.
- choose layer>time>enable time remapping… (this will add a time remap property to the layer/precomp with two keyframes, one at the beginning and one at the end, don’t move those)
- this part is slightly odd, but position the time cursor on the last time remap keyframe, notice that there is nothing there. that key frame signifies the end of the clip, but not the last frame of the clip. you need the last frame, so move up one frame, then add a new keyframe (don’t reposition the end keyframe).
- now you should have 3 keyframes, delete the end keyframe.
- option or alt click the stopwatch for time remapping to enable expressions for it
- type loopOut() in the expression field.
- now drag the out point (the end of the layer, not the key frame) for as long as you want it to loop.
if you are still having trouble with crashes, you may want to render out the precomp, import the rendered file and work with that. that allows you another option for looping that was suggested in your other post, where you can set the loop in the interpret footage window, or the same way discussed here.
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Danny Perez-triana
October 17, 2008 at 11:22 pmsounds good, i got unexpectedly pulled away from the computer this afternoon for a random job, otherwise i would have responded earlier.
is there a way to set the interval for the loop? as in have the clip start every five frames or even less to create a kind’ve stutter motion?
thanks again and have a good weekend,
ignacio
dip
-
Kevin Camp
October 18, 2008 at 1:03 amit sounds like you may not be looking for a loop, but more like playing random segments of your animation….
here is a page from motionscript.com, go down to the section called ‘only a matter of time’. there is an example called random jump cuts, that sounds a bit like what you are looking for. if it is, then you can copy and paste taht expression into the time remap expression field to produce a similar effect…
you may need change the minVal and maxVal variables to this:
minVal = key(1).time;
maxVal = key(2).time – segDur;to allow the extending the endpoint of the precomp, without getting chunks of black or empty frames…
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Danny Perez-triana
October 18, 2008 at 2:27 ami think that motion script seems to allow for something a little more random and flickering than i need.
to clarify, what i have is a flame that comes into the shot from the bottom, has the path of an arc across about 7 frames, then falls to the other side on the bottom. the video is someone spinning a flame tool and the camera catches half of its circular movement. so it appears against all black coming in and leaving the frame.
the motion i’m looking for is constant. the flame comes in there would be a frame of black after it left the shot before the same flame reappears does the same path.
in my massive precomps i have the same quicktime movie of this flame (lasts about 7 frames) staggered up to about 30 layers. each layer after the next comes in every 5 frames. so we see the flame pass by through the shot with every layer every 5 frames.
the variable i would like to be able to control would be to have say, about ten seconds where the flames followed each other every ten frames. so the gap of black of frames would be longer than when i bring in the layers every 5 frames.
in both cases the same applies though, we see the flame pass through.
sorry for the long response, i’m just trying to be clear since you and this forum have been very generous with your advice. unfortunately this scenario is one that is hindering a large project with an upcoming deadline.
what do you think?
ignacio
dip
-
Kevin Camp
October 18, 2008 at 5:07 ami think i understand now… the portion you need to loop is 7 frames, but you want a pause of 5 frames in between the loops…
if your footage that you want to loop is the length you want (7 frames), then there is a slight change to what i described earlier. enable time remapping, but instead of adding the key frame one frame before the end keyframe, go 5 frames past the end key frame and add a keyframe. and don’t delete any keyframes.
now, if you use the loopOut() expression, it will loop from the beginning of the clip, but with a 5 frame pause in between loops.
does that seem to fit what you are looking for, or at least getting closer?
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Danny Perez-triana
October 18, 2008 at 12:44 pmit’s not happening for me for some reason?!
how is it that one would export a screen shot of the timeline? i was hoping to do this to attach so that you could see and maybe point out any inconsistency with your instructions, though i followed them to the letter, dunno if this is something with my software at this point. blegh…pretty desperate at this point, i should also specify that my time descriptions were off. from my comp, the flame’s arc lasts 17 frames and i have them coming in every 5 frames. so while it’s a consistent movement, it’s fast. the flames overlap creating a stuttery effect .
thanks so much for your time thus far, very cool of you,
but i’m still stuck in a confused state with the gremlins in my computer,
dip
-
Kevin Camp
October 18, 2008 at 5:19 pmsorry, i wasn’t getting the fact that you wanted the clip to overlap itself. you can do this by using multiple copies of the footage (3 total), or you may be able to get away with one and use the echo effect.
lets try the echo effect…
- if the footage layer is exactly 17 frames, enable time remapping and add the expression loopOut() and extend the out point of the footage for the required duration (i think you mentioned 30 seconds..?)
- add a single keyframe for time remapping at frame 18 (this is to make the math work a little better).
- add the echo effect to the footage, with echo time set to .2 (.2 is for 29.97 fps, if you are working in 25 fps, use .12, 24fps use .125) and set number of echoes to 3. you can try a few different echo operators, add or screen should work well for blending bright objects on black backgrounds.
this should composite 3 copies of the footage on top of itself at 6 frame intervals.
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Danny Perez-triana
October 18, 2008 at 5:52 pmThank you so much Kevin! this seems to be it!
you have provided the light at the end of the tunnel today. above and beyond with your time i must say, a real testament to the potential of the internet and this forum.
i’m being profuse cause i never would have figured this out on my own,
if i may ask one more question: hehe
in all this prerendering of this one clip back and forth across various compostions, i have yet to get a good compression of the flame. it will appear slow or stilted at times when rendered with animation, millions+ colors. it will appear this way in the compostion window as well.
while the echo effect is creating a constant stutter, there is still a fluid movement in the details of the flames that becomes noticeable when sluggish (in a bad way). does this make sense?
but thanks so much for all your help,
many blessings to you,
ignacio
dip
-
Kevin Camp
October 20, 2008 at 2:50 pm[Ignacio Triana] “it will appear slow or stilted at times when rendered with animation, millions+ colors. it will appear this way in the compostion window as well”
rendering to the lossless animation codec will often produce fairly large files with high data rates. the data rates can often exceed that of a hard drive, which means that it will not be played out smoothly in realtime… it will skip and stutter as it plays. this would not be uncommon. that codec is an intermediate codec that is used to avoid quality loss as you work with footage at various stages in a project, but is probably not use for the final piece which would probably end up as a compressed file with a lighter data rate for real time playback (something like mpeg-2, or dv, etc.).
the concern i have is that you mention that it is in the comp window too… when you preview you composition are you hitting the zero key on the numbers pad, or the space bar? you should hit the zero key to cache the rendered frames to ram. this should produce a real time playout of the preview, if you see a stutter there, then there is a problem, and it may take some time to track that down. just to note, hitting the spacebar renders the frames to disk, so sometimes the playout may not be smooth depending on how fast your drive is.
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Danny Perez-triana
October 23, 2008 at 2:56 pmhey kevin, i’m only having a problem in final cut now. the clips rendered, and in the composition window will play fine, but once i put them into the timeline they play sluggish.
even in sequences that they played fine in but a week ago. the sequence settings haven’t changed and i even compared the sequences (now fc6) to sequences on my old g5 that’s running fc5 and they were the same.
but i still get this sluggish playback. seems like this is a fc issue perhaps i dunno, but it’s yet another thing from holding this work back.
any suggestions?
i hope all is well,
ignacio
dip
Reply to this Discussion! Login or Sign Up