Shape gets horribly distorted after track nears frame edge

there seems to be a problem with shapes that track objects that have a strong perspective and moving towards the camera.
In this case, I tracked the shape of a lamp travelling towards the camera. As you can see, although the shape of the layer track (the green one) does not show any signs of abnormal distortions, the linked roto shape gets horribly distorted on the last few frames of the tracked range. The problem here was, that this did not show up, until I tweaked a few control points and moved backwards in time for revising purpose. Suddenly there were this extreme shuffling of these control points, as if there is a problem with coordinates that are a certain amount away from the edge of the frame.

Hi J-P,
thanks for the quick reply.
The surface was not twisted. However, I found out that deactivating “perspective” and retracking solved the issue. I must confess that the “perspective” mode is not very clear to me and how it differs from shear and rotation.

Hi Heiko,
Check your tracking. Usually this happens because one of the surface corners has moved behind the camera. You can see when this happens because the surface will look twisted. if that’s the case, you can probably fix the problem frame with AdjustTrack or manual tracking, or by simply making the surface smaller so it doesn’t intersect with the camera plane any more.
Best regards,