Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects A Rather Tricky Grid Question

  • A Rather Tricky Grid Question

    Posted by Luke Hale on April 9, 2007 at 3:55 pm

    Think this is quite a tricky one. I have a grid of squares. In each grid square will be one of four different cells; i.e. each cell has one of four different shapes contained within. I want the postions of each single cell to change its position randomly in the grid so that only one of the cells occupies one space in the grid at any one time. I also want the changes to be instantaneous, no sliding or moving of cells. If the solution could be an expression that changes the positions over time that would be a great added bonus.

    What may also complicate matters is the grid is not completely standard. For the pattern to work, each row must be offset. Imagine a brick wall made of square bricks and that is the grid. I could possibly offset the rows once the expression is applied? Or maybe apply the expression to rows and bring them together?

    Hope that is clear enough, if it isn’t just say.

    Thank you very much for any help you can give.

    Luke

    Accountneedsrealnameupdate replied 19 years, 1 month ago 4 Members · 4 Replies
  • 4 Replies
  • Iancorey

    April 9, 2007 at 4:58 pm

    I think I understand. There are only 4 possible images that will display?

    I’d put those four images (one after the other) in a pre-comp. Then build the grid out of those pre-comps, offsetting their start times so they switch at different intervals.

    Otherwise, using Hold* keyframes can shift position instantly with no inbetweening.

    *right-click on your keyframe and choose Toggle Hold Keyframe.

  • Luke Hale

    April 9, 2007 at 7:00 pm

    Thanks for your help. Can anyone give a more elegant way of positioning the pre-comps in a grid rather than just dragging them? Some kind of expression?

    p = [index*precomp.height];
    [p,0]

    Something a bit like the above for the x? Don’t really know how to make the next columns of the grid etc.

    Also what is the best way of randomly offsetting the start times of the precomps, rather than just dragging them on the timeline? Again an expression would be great.
    I am dealing with a lot of grid cells and really just want to speed up the process of animating.

    Thanks again.

  • Darby Edelen

    April 9, 2007 at 10:19 pm

    What I’m confused about here is the entire premise. You say want the cells of the grid to be laid out like a brick wall. You also want there to be 4 distinct images/shapes that appear in the grid at random positions. However, in a brick wall there is no such thing as a random position, the cells are very deliberately not random. If you want each cell to display a random image, that’s a different matter altogether.

    The cells, in that case, aren’t moving but the image in them is changing. This brings me to my next questions, are these ‘shapes’ really just shapes? Do they animate over time? Is there video footage involved? How do you want them to change? How long will each shape remain in the cell it’s in before it is replaced by a different shape?

    All of these things (and possibly more) should be taken into consideration before you can come up with a real solution.

  • Accountneedsrealnameupdate

    April 9, 2007 at 11:04 pm

    I remember seeing a cool way of laying thing out in a grid using the layer index, the expression set the first position, then each layer was that position plus an offset multiplied by the layer index, all you had to do was duplicate the layers and they spread out in a grid automatically.
    Sorry I can’t remember what tutorial it was in, pretty sure it was Dan Ebberts.

    Glennser

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