Mailing List AE-List@media-motion.tv ? Message #45893
From: Robert Kjettrup <robert@stvmayday.dk>
Subject: Re: [AE] expression for facing away layers in precomp
Date: Wed, 26 Sep 2012 21:41:28 +0200
To: After Effects Mail List <AE-List@media-motion.tv>
wow, Dan ofcourse you are the one to come up with some complex vector math

I would never ever myself come up with that, vector math is very fuzzy for me :-D

But... it begins to act weird when rotating the precomp in the main comp around.

Right now i think i will finish the project the old fashioned way with all the layers in the maincomp. But if you are interested i have made a simplified project of my current project where you can take a look at what the problem is. try rotating any of the layers in 3d space and it doesn't correctly turns off the layers when the face away from the camera. If you just rotate the camera it seems to work.

you can find the project here:


Robert Kjettrup / Grafiker / STV Mayday
Mobil: 25 18 95 16
Mail: robert@stvmayday.dk


2012/9/26 Dan Ebberts <debberts@comcast.net>
Sorry, I’ve been asleep at the switch.  :)
 
Try this:
 
L = comp("Main Comp").layer(thisComp.name);
C = comp("Main Comp").layer("Camera 1");
 
p1a = toWorld(anchorPoint);
p1b = toWorld(anchorPoint + [0,0,1]);
p2a = L.toWorld(p1a);
p2b = L.toWorld(p1b);
v1 = p2b - p2a;
v2 = C.toWorld([0,0,0]) - p2a;
if (dot(v1,v2) < 0) value else 0
 
 
Dan
 
Sent: Wednesday, September 26, 2012 10:29 AM
Subject: Re: [AE] expression for facing away layers in precomp
 
Hi
 
But thanks again for giving it a try.
The expression i want is also way over my head, hence me asking the group here ;-)
 

Robert Kjettrup / Grafiker / STV Mayday
Mobil: 25 18 95 16
Mail: robert@stvmayday.dk


2012/9/26 scott.aelist <scott.aelist@gmail.com>
oh right. I guess you'll need to find an alternative to the toCompVec function then. Something you use with a null instead of the comp camera. Unfortunately that's way out of my territory.
 

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster