Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects simple loop expression

  • simple loop expression

    Posted by Jay Brown on February 19, 2008 at 1:48 pm

    Hi

    I have a comp 4s long of a record spinning (1 revolution)

    I added the expression loopOut(“cycle”) to the rotation field

    When I nested this record pre comp in a 20sec main comp to test, the record dissappeared when the precomp record finished. (I expected the loop to repeat it to eternity so to speak)

    I have read similar posts to this but the resolution was not clearly defined

    Thanks in advance from an expression newbie

    Madhav Gopalan replied 10 years, 8 months ago 7 Members · 10 Replies
  • 10 Replies
  • Steve Roberts

    February 19, 2008 at 1:54 pm

    Is everything (layers and comps) the same length (running time)?

  • Jay Brown

    February 19, 2008 at 3:18 pm

    Hi

    Comp 1
    4secs long, 1 layer which holds a record image.
    keyframe@ 0 degrees rotation at home keyframe@360 degrees rotation at end(4secs)

    (so 1 revolution of the record over the timeline)

    loopOut(“cycle”) in Expression:Rotation

    Comp2
    Now to see if my expression was correct I placed the above comp(4secs) in a new comp 20secs long, expecting the nested comp to keep looping (because of the expression).However after 4secs the record disappears.

  • Jay Brown

    February 19, 2008 at 5:20 pm

    My problem is creating a loop with an expression though as i want to avoid making the pre comp too long just to make sure it lasts as long as it needs to in the main comp.

    I am aware that after the out point its over you will not see the footage, hence me using a loopOut expression. (I thought this would loop the comp?)

    If my first mail was too convoluted I basically want to have the record spinning indefinitely in the precomp so I dont have to worry about the actual length when its sits in the main comp.

  • Jay Brown

    February 19, 2008 at 6:01 pm

    wow …. i thought I was just slow on the up take and it was quite an easy operation to fulfill

    I guess I’ll lengthen the pre comp then :O)

  • Mike Clasby

    February 19, 2008 at 6:09 pm

    If you want your expression to work go back into the 4 second record comp (where the expression is), then hit Ctrl K to bring up the comp settings, and set the comp length to 20 seconds. Now pull out the record layer to the full 20 sec in that comp. It’s now long enough to work in that 20 second comp.

  • Jay Brown

    February 19, 2008 at 6:49 pm

    Ok thanks everyone

    I was misinterpreting, to a degree, what the loopOut function was about

    Many thanks for your patience

  • Jeremy Allen

    February 19, 2008 at 7:50 pm

    In a pinch, you could always export the record spinning 1 perfect revolution. Then re-import the footage and use Interpret Footage to loop it however many times you like, kinda like Dave was saying. You’d need to export with RGB+Alpha.

    I know that’s not exactly what you were going for, but it would produce the same end result.

  • Patricio Veloso

    February 19, 2008 at 11:03 pm

    Maybe you made a gramatic error you miss the underscore.
    Maybe try doing a Time remapping, but before precompose the layer.

    This expresion works fine for me.

    loop_out(“cycle”,0)

    Greetings from Chile!

    Fabrica Audiovisual
    Broadcast Television editor / VFX Postproducer / Old School Rocker! 😛

  • Michael Hancock

    February 21, 2008 at 3:11 pm

    Loop Out is really the only expression I’ve ever used, but I’ve found (like you have) that it only loops that layer for the duration of the comp it’s originally in. In this case, your precomp. That’s why you need to make your precomp longer.

    You should just prerender the 4 second spinning record, reimport it, then go to your Interpret Footage settings and set it to loop 50 times. That will make the prerender 200 seconds long, and that should give you enough time for any new comp you drop it in, and your final render will be faster.

    Michael.

  • Madhav Gopalan

    September 9, 2015 at 7:22 am

    Is it possible to loop a comp only every other time of it’s cycle?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy