After Effects CS5 Parallel Auto Orient

For all help and discussion relating to visual effects in programs that are not already covered in an existing forum, such as Blender, Particle Illusion, etc., along with discussion about effects theories and techniques.

Moderator: Niotex

User avatar
Joined: Wed Jan 30, 2013 1:33 am
Org Profile

After Effects CS5 Parallel Auto Orient

Postby dimster » Sat Apr 20, 2013 10:02 am

I want to recreate this effect in the video.
Spinning of the video tracks while retaining its orientation.

I know there is auto orient towards camera, but I want the tracks to be in parallel with each other.
And also, is there a shortcut to position the absurd number of tracks randomly in 3D space.
Thanks in advance.

User avatar
Joined: Wed Dec 20, 2000 9:32 am
Location: Chicago, IL
Org Profile

Re: After Effects CS5 Parallel Auto Orient

Postby Brad » Sun Apr 21, 2013 7:10 pm

Unfortunately the YouTube video is apparently unavailable to view in the U.S.

As far as distributing layers randomly in 3D space, you're talking about using Expressions. Specifically the wiggle() expression. Here's how you'd want to set it up.

Create a Null object. Add the effect "Slider Control" to it. On the position property of your layers, alt-click the stopwatch, and put in:

wiggle(0,thisComp.layer("Null 1").effect("Slider Control")("Slider"))

Notice the words in quotes. If your Null object is called something else, and if you renamed your effect, you'll need to change those in the expression accordingly.

Now, if you increase the amount in the slider, that will randomize the position values of your layer within a radius of your slider value. For example, if you set the slider to 100, your layer's position will be put into a random location within 100 (or -100) of it's original position in x, y & z.

This is not really a fantastic way to do it to be honest because the randomness is based on your layers place in the layer order. So lets say you have your layer randomized to the place you like but then you have to move the layer up or down in the timeline. It will jump to a new location in space. So, if you really need to art direct where the layers are in space, I'd say you're better off just placing them by hand.
Ask Brad an After Effects Question! - Forum - Site

User avatar
Joined: Wed Jan 30, 2013 1:33 am
Org Profile

Re: After Effects CS5 Parallel Auto Orient

Postby dimster » Mon Apr 22, 2013 2:57 am

Thanks for the input Brad!
Anyway, I found the solution for my auto orient from

Code: Select all

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]); }
else{ a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]); c = 0; }

Now I wish I hadn't uninstall trigonometry from my brain. :?

Return to “Visual Effects”

Who is online

Users browsing this forum: No registered users and 0 guests