ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Problem with nulls from 3D camera track

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam LewenProblem with nulls from 3D camera track
by on Mar 31, 2014 at 8:28:24 pm

I am having problems and i'm trying to find a solution

I have an animation of a map fly over
I solved a 3D camera track and it helped in adding a path along the map - Great
I am also trying to add signs (those colored plates)
Problem is - I can't figure a way to have them parented to the map or nulls without getting skewed
The skewing is due to the camera to begin with...
I'm trying to figure a clean way of having these color blocks straight and nice - without doing it manually
A "regular" tracker does not seem to help me either.
I hope I make sense with my question
I have been trying to tackle this for a while :-\

Example above

Return to posts index

Walter SoykaRe: Problem with nulls from 3D camera track
by on Apr 1, 2014 at 3:49:37 am

You will probably benefit from Dan Ebberts's expression to orient a layer to the camera plane. Alt-click the stopwatch for a layer's orientation property and paste in the following:

L = thisComp.layer("Camera 1");
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){
c = -Math.atan2(v[0],u[0]);
a = -Math.atan2(w[1],w[2]);
a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);
c = 0;

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events

Return to posts index

Adam LewenRe: Problem with nulls from 3D camera track
by on Apr 1, 2014 at 7:00:37 am

Thanks Walter
Unfortunately the script gave me a similar result to what I had. But I did manage to fine a solution that I was happy with.
Analyzing again and changing the 3D track camera to a fixed and specifying my own angle of view (a really wide one worked great :-0 not sure why, I will test to see more results)

But this way I managed to have the colored planes moving with me in a nice manner!

Thanks for replying and I will save this script for future tasks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved