Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using a Slider To Move Comps from a Circle into a Straight Line

  • Using a Slider To Move Comps from a Circle into a Straight Line

    Posted by Daniel Hoover on April 23, 2009 at 2:45 am

    Hello all,

    I am working on a music video for my animation course and I need a little help.

    I have 5 comps positioned evenly around in a circle. They are all parented to a null with an anchor point in the center of the circle made by the 5 comps. I use the null to rotate all 5 comps around the circle (i.e. spinning a comp on the back side of the circle to the front).

    However, I would like to be able to “uncurl” that circle into a straight line, almost as one would unroll a curled-up rug. The positions of these 5 comps are controlled by an expression slider: the value of the slider is the radius of the circle, which scales from the center of the circle.

    Is there a way to create a slider that would allow me to curl and uncurl my comps from a circle to a line, and back? I’m not using an Angle Control, as that would create more of a “collapsing” of the circle, like an accordion. I was going for a look like someone was holding a piece of string taught, and then put it into a circle, and then uncurled it back to a line, using a slider. Is this possible?

    Thank you so much for your help!

    -Daniel

    Daniel Hoover replied 17 years ago 2 Members · 2 Replies
  • 2 Replies
  • Ben Rollason

    April 23, 2009 at 9:27 am

    How about replacing the five videos with five nulls.

    Then make a second set of five nulls and position them along a line.

    Now drop your video in there and add two expression-layer sliders. Call them myLayer1 and myLayer2 or something. Set these for each video so that the first one references a null on the circle and the second one references a null in the line.

    Now set an expression slider “crossblend”. This should be a value between 0 and 100. You can clamp it by adding the following expression. t = effect(“crossblend”)(“Slider”); t = (t>100?100:(t<0?0:t));

    and put the following code in the position attribute...


    myBlend = effect(“crossblend”)(“Slider”)/100;
    l1 = effect(“myLayer1”)(“Layer”);
    l2 = effect(“myLayer2”)(“Layer”);

    P = ( l1.transform.position*myBlend + l2.transform.position*(1 -myBlend) );

    Ben.

    this is the average between the two points.

    http://www.benrollason.com

  • Daniel Hoover

    April 28, 2009 at 6:27 am

    Dude, Ben you are the MAN!

    That worked perfectly! Thanks a million!

    -Daniel

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