Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Element 3D Car Tire Rotation

  • Element 3D Car Tire Rotation

    Posted by Jason Jenkins on January 7, 2014 at 9:48 pm

    I found the following expression by Dan Ebberts. He was helping someone else trying to automate tire rotation on an Element 3D car model. I applied the expression to a null set up for tire rotation, but nothing happens. No error, but no rotation. Any ideas?

    dist = 0;
    f = timeToFrames(time);
    f0 = timeToFrames(inPoint);
    for (i = f; i > f0; i--){
    p1 = position.valueAtTime(framesToTime(i));
    p0 = position.valueAtTime(framesToTime(i-1));
    dist += length(p0,p1);
    }

    360*(dist/(Math.PI*width))

    Jason Jenkins
    Flowmotion Media
    Video production… with style!

    Check out my Mormon.org profile.

    Jason Jenkins replied 12 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    January 7, 2014 at 11:05 pm

    Does the null have a parent? If so, you’d have to modify it to do something like this (sorry, I don’t have time to test it):

    p1 = toWorld(anchorPoint,framesToTime(i));
    p0 = toWorld(anchorPoint,framesToTime(i-1));

    Dan

  • Jason Jenkins

    January 7, 2014 at 11:18 pm

    [Dan Ebberts] “p1 = toWorld(anchorPoint,framesToTime(i));
    p0 = toWorld(anchorPoint,framesToTime(i-1));”

    Great! The wheels are spinning now. Unfortunately, when I animate the car in reverse, the wheels still spin forward…

    Jason Jenkins
    Flowmotion Media
    Video production… with style!

    Check out my Mormon.org profile.

  • Jason Jenkins

    January 8, 2014 at 8:21 pm

    [Jason Jenkins] “when I animate the car in reverse, the wheels still spin forward.”

    Could this have something to do with the parent null axes not matching the orientation the world axes?

    Jason Jenkins
    Flowmotion Media
    Video production… with style!

    Check out my Mormon.org profile.

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