FORUMS: list search recent posts

Auto-orient along path doesn't work when there's a Position expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Noel Powell
Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:13:44 pm

Hi,

I'm encountering what seems to be a bug and I'm wondering if anyone else has run into it and if there are any known solutions. It's different from the known "flipping" problems that I've been reading about.

I have a layer with keyframes on the Position to have it move. I've oriented the layer along the motion path using the Transform/Auto-Orient/Orient Along Path feature. It works fine until the layer gets to the last keyframe, and then it stops auto-orienting. I was able to narrow down the problem to an expression on the Position property. It seems that any expression on the Position property will cause Auto-orient along path to stop working after the last keyframe of the motion path. It doesn't matter what the expression says - it can even just say "value". I've done this in CS5 and CC2015 with the same results.

Any ideas? I do need the expression there (I can't use the Transform effect).
Thanks in advance.

After Effects Templates - digital glitch effects, 80s VHS effects, old film effects, art effects, and more: http://CreationEffects.com


Return to posts index

Dan Ebberts
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:26:58 pm

Just curious--what's the expression?

Dan



Return to posts index

Noel Powell
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:38:32 pm

The short answer is it's a wiggle expression. It's actually a wiggle expression within an if/else statement. The layer is 3D and the expression makes the layer wiggle in three dimensions as it moves along the path, which also twists and turns in three dimension. And even when the layer wiggles off the path, it still stays oriented to the next keyframe, which I like.
However, as soon as it reaches the last keyframe, it stops orienting. I've done simplified tests with the same results. I made the layer 2d, and tried just animating it to move across the screen, with just 2 keyframes. It still goes back to its original orientation at the end of the animation.

After Effects Templates - digital glitch effects, 80s VHS effects, old film effects, art effects, and more: http://CreationEffects.com


Return to posts index


Dan Ebberts
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:43:18 pm

It might be very helpful to see the exact expression.

Dan



Return to posts index

Noel Powell
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:48:34 pm

...Sorry for the double post.

And sure, here's the expression:

if (effect("Turn on Automatic Wing Flapping")("Checkbox")==1)
{ wiggle(effect("Position Wiggle Speed (times per sec)")("Slider"),effect("Position Wiggle Amount (in pixels)")("Slider")) }
else
{ value }

After Effects Templates - digital glitch effects, 80s VHS effects, old film effects, art effects, and more: http://CreationEffects.com


Return to posts index


Dan Ebberts
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 10:20:12 pm

That's interesting. One thing you could try is turning off Auto-Orient and instead using an orientation expression like this:


t = position.key(position.numKeys).time;
if (time < t)
lookAt(position,position + normalize(position.velocity))
else
lookAt(position,position + normalize(position.velocityAtTime(t-.001)))


Dan



Return to posts index


Noel Powell
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 10:44:00 pm

Dan, that seems to work perfectly. Thank you so much.

I'm curious, did you run any tests and see what I was talking about? I'm considering reporting the bug.

After Effects Templates - digital glitch effects, 80s VHS effects, old film effects, art effects, and more: http://CreationEffects.com


Return to posts index

Dan Ebberts
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 10:53:42 pm

>did you run any tests

I did. It looks like it could be a bug. I'd say go ahead an report it.

Dan



Return to posts index

Noel Powell
Re: Auto-orient along path doesn't work when there's a Position expression
on Feb 18, 2016 at 9:40:43 pm

The short answer is it's a wiggle expression. It's actually a wiggle expression within an if/else statement. The layer is 3D and the expression makes the layer wiggle in three dimensions as it moves along the path, which also twists and turns in three dimension. And even when the layer wiggles off the path, it still stays oriented to the next keyframe, which I like.
However, as soon as it reaches the last keyframe, it stops orienting. I've done simplified tests with the same results. I made the layer 2d, and tried just animating it to move across the screen, with just 2 keyframes. It still goes back to its original orientation at the end of the animation. It seems to do this no matter what I change the expression to. And if I take the expression out completely, it works fine.

After Effects Templates - digital glitch effects, 80s VHS effects, old film effects, art effects, and more: http://CreationEffects.com


Return to posts index

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