Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects making a planet orbit using position keyframes

  • making a planet orbit using position keyframes

    Posted by Jemron on June 6, 2007 at 3:58 pm

    Ok, so I’ve got a solar system looking comp, with a planet orbiting the sun. But, I’m using a null object to create the orbit, then I have the planet auto-orient to the camera so that it looks like it is always 3D. The problem is, I really need to create the orbit by using position keyframes, not a null object.

    The reason is that I’m going to parent the position keyframes of a particle generator’s emitter so that the planet has a tail (like a comet) as it orbits the earth. I can’t get the tail to follow along the path of the planet because of the null object. If I could just make a circular path in 3D space so that the position of the planet is orbiting instead of the rotation of the parent null object, then I can parent the emitter position (of CC particle World)to follow the position of the orbit path. Does that make sense?

    Louistr1 replied 18 years, 9 months ago 4 Members · 6 Replies
  • 6 Replies
  • Jemron

    June 6, 2007 at 4:05 pm

    I should probably mention that I’m using Andrew Kramer’s tutorial from Videocopilot.net to get the emitter to look like a tail. I’ve used his expression to do the “3d stroke” look.

  • Dan Ebberts

    June 6, 2007 at 6:40 pm

    Have you tried an expression like this for the emitter position?

    L = thisComp.layer(“planet”); // your planet layer here
    L.toWorld(L.anchorPoint);

    Dan

  • Jemron

    June 6, 2007 at 7:17 pm

    You are a true genius! Any chance you could explain to me what I just did? I’m new to expressions. I’ve been to your site, but get scared away by all of the explanations of javascript. I’ll learn one of these days.

    Thank you so much.

  • Darby Edelen

    June 6, 2007 at 7:29 pm

    L = thisComp.layer("planet");

    This first line just assigns your layer to the variable ‘L’ so it can be easily accessed in future declarations & functions.

    L.toWorld(L.anchorPoint);

    This is where the magic happens, this transforms the ‘L’ layer’s anchor point position from ‘layer space’ (i.e. where it resides on the layer) to ‘world space’ (i.e. where it resides in the 3D space of the composition). This point in world space is the value that’s returned by the expression.

    I definitely recommend you look at other layer transformations when you’re feeling more comfortable with expressions, they help a ton with integrating 2D effects into ‘3D’ space.

    Darby Edelen
    DVD Menu Artist
    Left Coast Digital
    Aptos, CA

  • Jemron

    June 6, 2007 at 7:33 pm

    Sooooo helpful. Thank you!

  • Louistr1

    August 16, 2007 at 7:23 am

    That’s sooo cool! I am doing the same thing too…It will be easier if you do each planet in a separate video then link them together in final cut or something

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