Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Card Dance Leaves Edges

  • Card Dance Leaves Edges

    Posted by Atomic on August 24, 2007 at 7:08 pm

    Hi All,

    I have a multi-layer 320×240 photoshop document.

    I import it into After Effects as a composition, footage dimension is layer size which generates a 320×240 composition with all my layers in the file.

    CTRL-K and I resize the composition to 2560×1920 (8×320, 8×240). This is my 8×8 grid to hold my images.

    I am using square pixels in photoshop and my after effects composition.

    My top layer in the composiiton is poisitoned at 160×120.
    All other layers use a position expression to distribute them around the grid.

    Here is the position expression:
    [code]
    grid_x = 3;
    grid_y = 4;
    x =(320*grid_x) +thisComp.layer(“top_layer”).transform.position[0];
    y =(240*grid_y)+thisComp.layer(“top_layer”).transform.position[1];
    [x, y];
    [/code]

    This way I can assign any layer in the comp to any grid position by simply editing the grid_x and grid_y variables in that layers position expression.

    Ok, that composition looks right to me an I have all my images layed out in an 8×8 grid.

    I create another composition and drop the 8×8 grid into it and assign a card dance effect. I set the Backlayer to the 8×8 grid and set the gradient layer to another layer that has an animated gradient to push the cards around.

    So it works, for the most part.

    But…

    Certain images in the grid get “chopped” incorrectly by card dance. I assumed there was some problem with my math and the initial grid layout, but even if I scale my grid images down so there is no edge to edge touching in the grid, I still get these terrible anomolies that destroy the effect and make it useless.

    Just wondering if anyone else has had this problem with card dance?

    Kevin Camp replied 18 years, 8 months ago 3 Members · 3 Replies
  • 3 Replies
  • Mike Clasby

    August 24, 2007 at 8:14 pm

    I can’t get your grid expression to work, maybe because I’m on AE6.5, but I dropped the “transform” and still no luck.

    For Grids, I like Dan’s Grid expression, below, adjusted for an 8×8 grid, which is what I think you’re doing for you’re 320×240 layers:

    numRows = 8;
    numCols = 8;

    row = Math.floor((index – 1)/numCols);
    col = (index – 1)%numCols;
    x = col*width + width/2;
    y = row*height + height/2;
    xOffset = (this_comp.width – numCols*width)/2;
    yOffset = (this_comp.height – numRows*height)/2;

    [x,y] + [xOffset,yOffset]

    This goes on Position of all layers, not other positioning is necessary. Make sure they’re at the top of the stack.

    If this doesn’t solve your problem, maybe try making the 320×240 layers slightly smaller, by scaling them to 99%, this leaves a transparent gap between layers.

    Or

    Precomp all the layers in the grid (move attributes), then, add the effect, Render>Grid.

    Grid

    Size From Width and Height Sliders
    Width: 320
    Height:240
    Color: Black
    Blending: Multiply

    and add the Effect, Unmult (Knoll Unmult, freebie, Goggle it) to make the black grid transparent.

    I think the resize above is easier.

    Good luck.

  • Mike Clasby

    August 24, 2007 at 8:28 pm

    Opps, sorry I didn’t see you already tried the scaling.

  • Kevin Camp

    August 24, 2007 at 8:41 pm

    i’m having trouble replicating your problem with card dance….

    i liked your expression… i modified it a bit to work for any size comp or any size layers and you can add it to all layers (it doesn’t need the first to be in place) and since it’s based on the index number to modify the postion of a layer in the grid you just need to drag it up or down in the layer order, all other layers will adjust accordingly.

    numCols = Math.round(thisComp.width / width);
    grid_y = Math.round((index / numCols) – 0.51);
    grid_x = index – (numCols * grid_y);
    x = (width * grid_x) – (width / 2);
    y = (height * grid_y) + (height / 2);
    [x, y]

    its a bit different than dan’s in that it assumes you want the grid to fill the comp as well as it can, rather than defining number of rows and columns.

    but even after creating the grid comp and applying card dance witht he cols and rows set to 8 and 8 (and making a gradient for offset), i didnt have any incorrect dividing.

    Kevin Camp
    Designer – KCPQ, KMYQ & KRCW

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