-
2D position from 3D layer wraps around behind camera?
So I’m using the ever-useful
l = thisComp.layer("3D Null");
l.toComp(l.anchorPoint);
in the position of my 2D nulls to have a series of 2D nulls “track” 3D nulls in a scene. (Building a 2D spline that in screenspace mimics a 3D spline through space.)Unfortunately, if my 3D nulls go “behind” my camera far enough, the 2D calculations suddenly seem to “flip” to the other side of the world. They’re off-screen, but on the wrong side. I suspect maybe the numeric precision is wrapping off the end of the world space or something (?). Because these are points in a continuous spline that I’m feeding to another plugin (Boa), rather than that part of the spline just remaining comfortably off-screen, it suddenly crosses straight across the screen. (Say the spline was vanishing off screen over our POV “shoulder” in the lower left corner, now that 2D point is suddenly very far in the upper right, meaning the spline erroneously streaks diagonally across the frame.)
Wondering if there’s some suggestion on how to keep the off-screen 2D nulls (or 3D nulls) in the right space off-screen or how to adjust the calculations when they go drastically behind the camera in Z space? (Perhaps some way to tell if they are behind the camera and then adjust to keep them closer but just off screen in the correct direction?)
Frankly, this feels like a job for Dan Ebberts. I just can’t quite figure out the best way to tackle this.
Thanks in advance,
zane