Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controlling multiple video tiles according to grid positions

  • Controlling multiple video tiles according to grid positions

    Posted by Eran Amir on July 12, 2013 at 4:22 pm

    Hello everybody!

    (Originally posted in ” Adobe After Effects basics” and was referred here in the comments)

    I am looking for an efficient way to control a grid of video clips.
    I want to create a grid using, say, 1000 small video clips,
    and “trigger” each clip according to a different animation on top.

    Here is an example of something similar to what I am looking to acheive (@2:10):
    https://www.youtube.com/watch?v=Da_9kfzgLLc

    The main difference is that instead of just hiding/revealing the layer underneath,
    I want to have a video turn on and off depending on a layer above it.

    I would be happy to hear any tips or techniques that might help,
    Or what kind of keywords I should be googling (hadn’t had any luck so far).

    Thanks,
    Eran.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Eran Amir replied 12 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 12, 2013 at 9:25 pm

    What triggers the video to start playing? Is it the layer above moving over the video layer (relative to the comp view)? What happens when the layer moves away (does the video hold the last frame played)? Does it start up again if the layer moves over it again?

    Dan

  • Eran Amir

    July 12, 2013 at 10:44 pm

    I’m thinking something along this:

    The layer above the tiles (the control layer) will be an animation with an alpha mask,
    and whenever, for example, a black pixel is over a tile in the layer below,
    it triggers the short video clip.

    As for the rules for starting/ending a clip I would say ideally:

    If a clip is triggered it plays through till the last frame,
    and only then can it be triggered again by the control layer.

    Thanks,
    Eran.

  • Dan Ebberts

    July 13, 2013 at 5:01 pm

    Expressions may not be the way to go for this if you’re going to have 1000 video layers. If you want to try it though, here’s a simplified example. This assumes that the video and mask layers are stationary and overlapping, and that the alpha area on the mask is animated. Apply this to the video layer’s time remap property. The video should start playing at first alpha contact and play trough to the end. This method really eats up a lot of resources, so I’m not confident it will be useful to you, but it might give you some ideas. It gets more complicate if the layers themselves are moving.


    mask = thisComp.layer("mask");
    UL = mask.fromComp(toComp([0,0]));
    LR = mask.fromComp(toComp([width,height]));
    f = 0;
    fStop = timeToFrames(time);
    trigger = false
    while (f <= fStop){
    t = framesToTime(f);
    s = mask.sampleImage((LR+UL)/2,(LR-UL)/2,true,t);
    if (s[3] > 0){
    trigger = true;
    break;
    }
    f++;
    }
    if (trigger)
    time - t
    else
    0

    Dan

  • Eran Amir

    July 13, 2013 at 5:10 pm

    Thank you for the help!

    I will dive in and try the method this week.
    You said this probably will be too resource heavy with 1000 video clips,
    and I often wonder how can one control so many clips in AE efficiently.
    It’s quite different than what I’m asking here, but I’m really curious how this video was made:

    https://www.youtube.com/watch?v=qVpaanzd9Cs

    is it just hours of meticulous AE work? or is there a shortcut? or maybe it’s not in AE at all?

    Thanks,
    Eran.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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