FORUMS: list search recent posts

Question about skew and expression

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
kawin tisase
Question about skew and expression
on Mar 9, 2019 at 4:32:50 pm

Hello everyone,I have found a problem I'm while trying to modify the isometric look of shape layer

This is shape layer 3, It has skew value of 44 and zero rotation



This is Shape layer 2,No skew value and zero rotation



The depth of shape layer 3 is control by null object with slider control name Depth



I tired to make Shape layer 2 to and layer 3 protrude by this expression


//Increase Depth to protrude shape layer 2 and 3
SVal=44;//the skew value of layer 3
S=thisComp.layer("Shape Layer 3"); //refer to shape layer 3
a=S.sourceRectAtTime(time-S.inPoint,true).height;//Get height of shape layer 3 at current time, because i cannot get a dimension of shape layer when I skew it.
x = a/Math.tan(degreesToRadians(SVal));// Tan value of 44
y =a;
value+[x,y]//move shape layer 2


The problem arise when I crank the Depth value to some value , the border of shape layer 2 and 3 tends to move away from each other


The question is
1-How did it happend
2-If the skew value is like, 50 the angle between rectangle border and line perpendicular to it will be 50?. or am i wrong?. If i was wrong, can i ask you how does the skew work.



Any answer will be appreciated


Return to posts index

Oleg Pirogov
Re: Question about skew and expression
on Mar 9, 2019 at 8:55:09 pm

Not exactly sure how all things work in your project, but:
1) Skew is the other angle, so multiplying by tan, not dividing
2) Default rectangle shape is skewed with respect to its center: the top and the bottom both move by the same amount in the opposite directions. I.e. the total shift should be divided by 2.

So try:
x = a*Math.tan(degreesToRadians(SVal))/2;// Tan value of 44
I assume it's an expression for the yellow shape's position and it's aligned with green at zero skew.


Return to posts index

kawin tisase
Re: Question about skew and expression
on Mar 10, 2019 at 8:22:45 am

Thank you for your answer ☺


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]