I'm trying to set up a scene where the camera flies from one photo to another in 3D space. The photos should be connected by a line. I set this up with the line as a shape layer and the points-follow-nulls script. I moved the nulls to the respective photos. And it's done, it works really well, even in 3D. And even the depth sorting works correctly, which I'm actually quite surprised about.
However, the comp needs to be pretty big, so the camera can fly from photo to photo and the viewer will get some sense of depth. So null A will have a zPosition value of about -3900 and null B around 5000. Once the camera flies past null A and the null is now behind the camera in 3D-space, most of the time the points-to-nulls expression on the path of the shape layer will fail with the message "Error: Composition point could not be projected on layer in 'fromCompToSurface'." (it's German, so might be a bit different in English).
Do you guys know of a fix for this case? It would be awesome to use this setup but with the disappearing line it won't be possible.
I attached an AE project with the expression error at the 5 second mark. If you move the time slider forward a bit the expression should evaluate correctly as the camera moves to the side.
Thisd is to be expected. Outside the comp the transform you are using will not work as apaprently there is no longer a sample point that can be determined/ projected from the composition matrix. You basically have your logic backwards, anyway. It would be more useful to actually connect the images with a thin solid or an effect like Beam, not have their positions be based on a shape line to begin with. The thin solids for instance could use a simple targeting expreession from one Null to the other and the Beam effect stuff could be rigged with consecutive toWorld() and toComp() layer space transforms, which don't depend on having actual projection points and just convert the coordinates...