SIGN IN
::
SPONSORS
::
ABOUT US
::
CONTACT US
FORUMS
LIBRARY
PODCASTS
BLOGS
MAGAZINE
SERVICES
NEWSLETTERS
NEWS
STORE
EVENTS
ADOBE AFTER EFFECTS:
Forum
AE Basics
AE Expressions
Tutorials
Articles
Podcasts
Motion Graphics
Training
Cinema 4D
Re: Layer Space Transform question
Cow Forums
:
Adobe After Effects Expressions
VIEW POSTS
•
ADD A NEW POST
•
SEARCH
•
CHANGE FORUM
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Re: Layer Space Transform question
by
Dan Ebberts
on May 7, 2008 at 4:22:44 pm
That's a lot tougher. I think the best you can do is to match the world orientation. Give this a try:
L = comp("Pre-Comp").layer("FOLDING SIDE");
CL = thisComp.layer("Pre-Comp");
u = CL.toWorldVec(L.toWorldVec([1,0,0]));
v = CL.toWorldVec(L.toWorldVec([0,1,0]));
w = CL.toWorldVec(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 = Math.atan2(u[1],v[1]);
c = 0;
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]
Dan
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Current Message Thread:
Layer Space Transform question
by Lloyd Alvarez on May 7, 2008 at 3:08:32 pm
Re: Layer Space Transform question
by Darby Edelen on May 7, 2008 at 3:32:35 pm
Re: Layer Space Transform question
by Dan Ebberts on May 7, 2008 at 3:45:21 pm
Re: Layer Space Transform question
by Lloyd Alvarez on May 7, 2008 at 3:55:46 pm
Re: Layer Space Transform question
by Dan Ebberts on May 7, 2008 at 4:22:44 pm
Re: Layer Space Transform question
by Lloyd Alvarez on May 7, 2008 at 4:42:51 pm
Re: Layer Space Transform question
by Darby Edelen on May 7, 2008 at 7:36:40 pm
Related Threads:
LayerSpace Transformations workshop
Note:
If you are a registered user and you
do not
see your name and email in the two respective fields above, you may reset your account cookies by clicking
here
. Your post
will not be accepted
if the name and email provided above are not currently registered in our database.
Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message
Entire Thread
None
Message
Note:
The following characters are HTML command characters, and may cause parts of your post to disappear, if not used correctly: < > &. To include any portion of the post in your response, highlight the desired text and hit the "Q" key. For more on how to post,
click here
.
Add your message signature
Note:
By clicking "Post Direct" button above, you are agreeing to the Creative Cow's
Code of Conduct
.
FORUMS
•
LIBRARY
•
PODCASTS
•
BLOGS
•
MAGAZINE
•
SERVICES
•
NEWSLETTERS
•
NEWS
•
STORE
•
EVENTS
©
CreativeCOW.net
All rights are reserved.
[
Top
]