FORUMS: list search recent posts

Auto Orient Along Path problem

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gary O'Brien
Auto Orient Along Path problem
on May 9, 2016 at 4:34:05 pm

I am using a 3D null to control the transform properties of an Element 3D model.

It is a spaceship shaped a bit like a car, that needs to lift-off the ground vertically (a bit like a helicopter), and then move forward on a curved flight path that banks off to one side (it's right).

The problem is that for Auto Orient Along Path to work along the majority of it's flight path as desired, it flips by 90 degrees at the start before it lifts off, as the first part of the motion is indeed vertical rather than horizontal. This means that at the start of the animation the front of the spaceship is pointing up at the sky instead of horizontally along the ground.

Is there a way for me to keep the model horizontal for the first few seconds of the motion, and then allow it to auto orient once the horizontal motion has kicked in?

Latest version of Element and CC2015

Thanks


Return to posts index

Dave LaRonde
Re: Auto Orient Along Path problem
on May 9, 2016 at 5:38:21 pm

You might be able to animate the layer's rotation to pull it off. If I'm reading things right, it will still remain a child to the null.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Gary O'Brien
Re: Auto Orient Along Path problem
on May 9, 2016 at 5:48:58 pm

Hi Dave,

Thanks, yeah I tried that idea. When AOAP was ON, during take-off AFX introduced an annoying wobble where I guess my keyframes are fighting the Auto Orient, but it looked fine flying horizontally. Or with AOAP OFF, the take-off works great, but the horizontal flight just looked kinda hokey as the orientation simply didn't match the curved direction of travel on every frame, no matter how hard I tried to match it by eye with keyframes.

Hope that makes sense.


Return to posts index


Wallace Adrian D'Alessio
Re: Auto Orient Along Path problem
on May 10, 2016 at 10:36:48 am

Have you tried cross linking to an expression manually?

Adrian D'Alessio aka; Fluxstringer

fluxstringer@gmail.com
http://www.facebook.com/FluxStringer
http://www.linkedin.com/in/fluxstreamcommunications

http://twitter.com/FluxStringer
http://mog.com/FluxMuse


Return to posts index

Gary O'Brien
Re: Auto Orient Along Path problem
on May 10, 2016 at 10:48:59 am

I was a little out of my depth to attempt that.

I've kept a bicycle pedal horizontal whilst it rotates before, by using a *-1 expression on the rotation value.

I tried that here, but the AOAP still overrides it, and I end up with it flying away pointing vertically down at the ground.

Any ideas on a more complex expression that might let me achieve what I'm after?


Return to posts index

Wallace Adrian D'Alessio
Re: Auto Orient Along Path problem
on May 10, 2016 at 12:11:26 pm

*1 does not give the correct orientation?

Have you looked at http://motionscript.com/ ?
or aesripts.com ?

on an Adobe site thread pavelusha_ provided and answer to what sounds similar.

Her script is this


Here is the correct working code for Auto orient. I needed it a couple of yers ago and because After effects has glitches I wrote my own expression. It's for 2D layer but you can easy modify it for 3D. Add this to rotation property:



counter=1;

direction=-1;


while((time-counter*thisComp.frameDuration>=0) && (thisComp.layer("Null 1").position.speedAtTime(time-counter*thisComp.frameDuration)==0)) counter=counter+1;


if (time-counter*thisComp.frameDuration<0){

direction=1;

counter=0;

while((time+counter*thisComp.frameDuration<=thisComp.duration) && (thisComp.layer("Null 1").position.speedAtTime(time+counter*thisComp.frameDuration)==0)) counter=counter+1;

counter=counter+1;

}


counter=counter*direction;

pre = thisComp.layer("Null 1").position.valueAtTime(time+(counter-1)*thisComp.frameDuration);

post = thisComp.layer("Null 1").position.valueAtTime(time+counter*thisComp.frameDuration);

delta = post-pre;

if (delta[0] == 0) delta[0]=1;

radiansToDegrees(Math.atan2(delta[0],-delta[1]));



Hope that might help somebody.

Adrian D'Alessio aka; Fluxstringer

fluxstringer@gmail.com
http://www.facebook.com/FluxStringer
http://www.linkedin.com/in/fluxstreamcommunications

http://twitter.com/FluxStringer
http://mog.com/FluxMuse


Return to posts index


Wallace Adrian D'Alessio
Re: Auto Orient Along Path problem
on May 10, 2016 at 12:15:31 pm

*1 does not give the correct orientation?

Have you looked at http://motionscript.com/ ?
or aesripts.com ?

on an Adobe site thread pavelusha_ provided and answer to what sounds similar.

Her script is this


Here is the correct working code for Auto orient. I needed it a couple of yers ago and because After effects has glitches I wrote my own expression. It's for 2D layer but you can easy modify it for 3D. Add this to rotation property:



counter=1;

direction=-1;


while((time-counter*thisComp.frameDuration>=0) && (thisComp.layer("Null 1").position.speedAtTime(time-counter*thisComp.frameDuration)==0)) counter=counter+1;


if (time-counter*thisComp.frameDuration<0){

direction=1;

counter=0;

while((time+counter*thisComp.frameDuration<=thisComp.duration) && (thisComp.layer("Null 1").position.speedAtTime(time+counter*thisComp.frameDuration)==0)) counter=counter+1;

counter=counter+1;

}


counter=counter*direction;

pre = thisComp.layer("Null 1").position.valueAtTime(time+(counter-1)*thisComp.frameDuration);

post = thisComp.layer("Null 1").position.valueAtTime(time+counter*thisComp.frameDuration);

delta = post-pre;

if (delta[0] == 0) delta[0]=1;

radiansToDegrees(Math.atan2(delta[0],-delta[1]));



Hope that might help somebody. "
___________________________________________________________


As a last resort you could try asking Abgie Taylor, she is always looking for expressions solutions.

http://angietaylor.co.uk/

She likes personal messages about expressions .

Adrian D'Alessio aka; Fluxstringer

fluxstringer@gmail.com
http://www.facebook.com/FluxStringer
http://www.linkedin.com/in/fluxstreamcommunications

http://twitter.com/FluxStringer
http://mog.com/FluxMuse


Return to posts index

Gary O'Brien
Re: Auto Orient Along Path problem
on May 10, 2016 at 12:56:52 pm

Thanks, I couldn't get that expression to work unfortunately, it caused the ship to rotate a further 90 degrees the moment it hit another keyframe in the motion path...

For now my work-around is to have two versions of the comp, one with, and one without AOAP activated. I've added them both to a third comp, and I just do a hard cut out of the first comp to the second once the ship has risen up, but before it needs to change heading as it moves off.

Not a particularly elegant solution, but it works for now at least...

Thanks for your efforts though. I may revisit this some other time as it's a bit of a head scratcher.

It's a shame AOAP isn't keyframe-able, but I guess that's just not how the thing is set up to work.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]