Page 1 of 1

hide a 3D layer when it's back is to the camera

Posted: August 15th, 2009, 5:10 pm
by benu
I swear I've seen this before, but can't find it anywhere... I'm trying to figure out the code to make a layer's opacity change from 100 to 0 the moment we see it's back instead of it's front. So if I were spinning a layer, it would hide itself at the moment where it has turned 90 degrees to the camera (when it is paper thin, waning), and wouldn't come back until it had moved another 180 degrees (and was paper thin, but waxing this time).

Does this ring a bell with anyone?

Re: hide a 3D layer when it's back is to the camera

Posted: August 15th, 2009, 8:28 pm
by Dan Ebberts
This should do it:

toCompVec([0, 0, 1])[2] > 0 ? value : 0


Dan

Re: hide a 3D layer when it's back is to the camera

Posted: August 17th, 2009, 6:10 pm
by benu
Perfect! Thanks, Dan!