Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Multiple Objects Orbiting a Nucleus

  • Multiple Objects Orbiting a Nucleus

    Posted by Mark Lowe on December 12, 2009 at 2:52 pm

    I had a look through the archive but can’t find anything relating to my specific question. Apologies if it has already been covered elsewhere.

    I am trying to create an animation where several ‘satellite’ objects orbit around (and disappear behind) one central ‘hero’ one (like moons orbiting a planet, i guess). I need it to do the following:

    The orbiting satellites need to keep facing the camera (or same direction) as they move
    The orbiting satellites need to ’emerge’ from the central axis point (ie: move out from the hero object pivot-point along their local z axis whilst orbiting). They all emerge at the same time and stop the same distance away from the hero object.
    The satellite objects need to be evenly distributed – there are several different animations to create with both odd and even numbers of orbiting satellites
    The animation has to be able to stop/start as each satellite object approaches the camera – effectively, one control has to link the speed of the satellite group rotation to the local satellite rotation that keeps each object facing the same direction

    I have solved some aspects with Null/Parenting techniques but I can’t create anything neat that adapts to work with both odd/even numbers of rotating satellites. Surely I’m missing a trick with expressions? I must be able to set something up where I can dial in the number of orbiting satellites and have them distribute accordingly whilst following the other rules?

    I imagine most expression gurus could solve this quicker than it took me to write the last paragraph but I’m stuck. Any advice graciously received. All the best.

    Mark Lowe

    Mark Lowe replied 12 years, 7 months ago 4 Members · 6 Replies
  • 6 Replies
  • Peter Vyrostko

    December 12, 2009 at 4:06 pm

    There probably are different approaches to this..
    For facing towards the camera……Transform>Auto – Orient>Orient Towards Camera….should work.
    As for the animation..the following depends on how you have parented your objects.
    For animating the centre…create a new adjustment layer called controller and apply effect Expression controller, rename it to offset.
    This should serve as animated property for moving the planets off the centre.
    Than, for offseting the position, aply to all the planets:
    x=transform.position[0];
    y=transform.position[1];
    z=transform.position[2];
    o=thisComp.layer(“controller”).effect(“offset”)(“Slider”);
    [x,y,z+o]

    This way you can animate all the z-offsets together, while you can also animate position of the planets separately.
    You can use the same approach for offseting the anchor point, rotation or basically anything..
    If you properly link all the properties to the propriate controller on an adjustment layer, you’ll end up with one layer with all and the only controllers you need to animate whole the composition and also the nested ones.
    For even distribution I would create two keyframes with values of -1 and 1 and loop them over 2 fromes. Then I would multiply the value with the rotation or z-position.
    As for stopping the animation at the certain point…
    It depends on what do you actually animate and how…
    As for animating the rotation of the planets I would probably use time information and multiply the value (on the adjustment layer) with the controller.
    For stopping the animation at this case I would probably use another instance of the time,to deduct the value from the properties you animate over the time expression. To trigger this simple create trigger controller,which you animate from 0 to 1.
    Then use this value wherever needed.
    At this point this already seems confusing enough, so if you need further help with this solution I can help.
    Depending on the number of the subjects I would probably stop all the animations manually.

    Peter

    x=transform.position[0];
    y=transform.position[1];
    z=transform.position[2];
    o=thisComp.layer("controller").effect("offset")("Slider");
    [x,y,z+o]

    time*thisComp.layer("controller").effect("rotation multiplier")("Slider")

  • Mark Lowe

    December 13, 2009 at 12:17 pm

    Wow, thanks for your help Peter! Very thorough.

    I am off to try what you suggested and I wil let you know how I get on later.

    Mark Lowe

  • Peter Vyrostko

    December 13, 2009 at 11:19 pm

    well…good luck

    after reading your post again…I realized, that the even distribution will not work that way. I used this approach with particles, so I got confused.

    Also..if you want to move the planets in the direction off the centre, you’ll probably need a null object for each planet,and then animate the anchor point of the null object to move the planet off the main centre. .. you probably know this by now.

  • Tim Boknecht

    July 13, 2012 at 7:54 pm

    I’m currently researching a way to do pretty much the same thing. Did this suggestion work for you? If not, can you tell us what worked for you?

    Tim Boknecht
    Media Producer
    Bravo Productions

  • Erik Justiniano

    September 2, 2013 at 10:25 pm

    Almost 4 years later…. YOU SAVED ME!’
    Thanks! 🙂

  • Mark Lowe

    October 16, 2013 at 5:18 pm

    Hi Tim

    Crikey, I haven’t re-posted here for a while! Apologies for the very late response but, as Peter mentioned, his original expression didn’t work quite as he had hoped.

    As my timescale was tight, I just did it the long-winded way. Basically, I divided however many objects I had in each orbit into 360 and then rotated them off axis by the appropriate amount (eg: 10 objects means the first at 36deg, the second at 72deg, etc).

    So, it worked great but it was just fiddly and time-consuming. Note to self – must learn more about expressions…!

    Hope that helps?

    Best

    Mark

    Mark Lowe

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