Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Work with coordinates and moves

  • Work with coordinates and moves

    Posted by Ben Schlanz on October 8, 2011 at 3:15 pm

    hi!

    i am trying to do a intro for a movie, but i encountered some problems:

    1) i want to make picture fall like a leave on a table. I made that working. But…
    2) All pictures together when they have fallen down shall make word like ENSAL.

    I thought, that i could work with paths and anchors. so i have a set of anchors on the paths that form my “ENSAL”.

    Now i want to make my expression randomly choose one of these points and let the picture fall down to that point.

    I had the idea to do it with an library of coordinates and a random-function, where he is allowed to pick any coordinate only once.

    But here im stuck.

    Problem 1) I cant find a way to make a “coordinates-library”
    problem 2) I cant find a random-expression, where he chooses from this libary AND every coordinate only once.
    problem 3) i cant even find out how to write transform.position expression in order to do what i want.

    I want my whole clip to be mostly automatic, so you just have to insert some pictures and a Path and ae will do the rest. but till there its a long way 😉

    I hope the problem is clear and you can help me. If there is sth unclear tell me.

    ben

    Dan Ebberts replied 14 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    October 10, 2011 at 9:47 pm

    I can think of a couple of ways to do what you’re trying to do, but neither are particularly easy. It would be pretty easy to set up an array of coordinates, like this:


    coords = [[100,100],[100,200],[100,300],[100,400]];

    The tricky part is getting each layer to pick a different coordinate. I think the best way to do it is to have a single expression assign the array indices for all the falling layers. The problem is publishing that data. You could do it by putting the main expression in a text layer that publishes a result like this: “2,0,3,1” which would mean that the first layer gets the coordinate from index 2 ([100,300]), the second layer gets the coordinate from index 0 ([100,100]), etc. The expression on the text layer needs a shuffle algorithm, and the position expressions for the falling layers need the coordinate array and code to parse the output of the text expression to isolate their index into the array. It’s a bit of work, but definitely do-able. It might be more trouble than it’s worth though.

    Dan

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