-
AE Z-depth math
Heya!
I had an idea for a “fake” black & white z-depth creator for after effects. It already works for planes facing the camera, but of course a floor plane creates trouble, as it can’t have one single color. I was thinking I could use a simple radial ‘Ramp’ effect on the floor plane if only I could do this math:
Imagine a scene with a camera and a floor plane that can have any position and orientation.
1) Find out the _shortest_ distance between the camera and the floor plane
2) Find out the xyz-coordinates for the intersection point of this distance vector and the floor plane
3) Turn this xyz-coordinate information into the plane’s local xy-coordinates. This is for controlling the ‘Ramp’ effects start point.I have a hunch that this is no easy task. Any help is deeply appreciated and of course I will publish the final code here.
– Teemu