| Hmm. Ill have to mess with it tomorrow. In the short term we switched to simple little color coded circles so that no one would be able to tell which way it was oriented. Sometimes faking it is all you need. ;-)
Making the whole thing more complicated was that I have the driver icons as collapsed transformation comps in the master racetrack layer and then I have that comp collapsed in the master comp so that I can control the orientation of everything inside the fake UI screen. Its kind of messy but it works.
In the midst of this I'm teaching my junior designer to be a motion artist. You should have seen his eyes glaze over when I started mucking around in the code. I told him as profusely as I could that he wouldn't have to use much more than wiggle(x,y) a great deal of the time.
I ended up putting the expression sliders for the motion path following in the master comp. it's pretty sweet being able to drive the animation inside the precomposition without having to switch back to another window. I'll try to remember to post a link once it gets released on the site.
Brian
On Sunday, April 28, 2013, Dan Ebberts wrote:
Hmmm... To get that expression to work, I’m guessing you’d need to use the
optional time parameter for the layer space transforms and specify the same time
you’re using to sample the null’s position. So, for example, if you’re getting
the null’s position with valueAtTime(t), you’d have to do the same calculation
for t in your orientation expression and then modify all the transforms to use
it, like this:
fromWorldVec(L.toWorldVec([1,0,0],t),t);
Hard to say for sure without seeing how you have it set
up.
Dan
Sent: Sunday, April 28, 2013 2:16 PM
Subject: Re: [AE] Offset along motion path?
OK. I've got that up and working. I gave the null object motion
path a loopOutDuration so that I could have the driver go around and around the
track. Now the next problem I'm trying to squash is how to get the object to
auto-orient around the path. Normal auto orientation doesn't seem to be working
since it's grabbing it's position from the slider instead of position.
(pasted for convenience)
L
= thisComp.layer("other layer");
u
= fromWorldVec(L.toWorldVec([1,0,0]));
v
= fromWorldVec(L.toWorldVec([0,1,0]));
w
= normalize(fromWorldVec(L.toWorldVec([0,0,1])));
sinb
= clamp(w[0],-1,1);
b
= Math.asin(sinb);
cosb
= Math.cos(b);
if
(Math.abs(cosb) > .0005){
-- not getting enough of my blather? check out http://flabbyironman.blogspot.com or my portfolio at http://behmcreative.com
|