Discussion:
3D layer invisible if facing away from camera -- doesn't like parenting
(too old to reply)
N***@adobeforums.com
2008-07-30 17:09:05 UTC
Permalink
I'm using this simple opacity expression from Adobe Live Docs.

if (toCompVec([0, 0, 1])[2] > 0 ) value else 0

However, if I have two layers (a front and back) and I parent one to the other, this expression breaks down because the child rotation never changes. Same thing if I parent them both to a null and rotate the null.

How can I make it work correctly with a parent layer or null?
D***@adobeforums.com
2008-07-30 20:07:47 UTC
Permalink
The expression doesn't depend on the rotation value, just the layer's orientation in comp space. Did you perhaps flip one of the layers 180 degrees on one axis?

Dan
N***@adobeforums.com
2008-08-03 23:08:16 UTC
Permalink
Ah, good catch, Dan. I had the orientation of the "back" of the card set to Y180°. It's working now. How would that original expression be written to take orientation into account?
D***@adobeforums.com
2008-08-04 03:05:59 UTC
Permalink
You could reverse the behavior of the expression like this for the layer that starts out rotated 180 degrees:

if (toCompVec([0, 0, 1])[2] < 0 ) value else 0

Dan

Loading...