People crossing past each other from the cameras point of view should not present a major problem unless you’re using one roto mask for more than one head or shoulders at a time.
Just as Roland suggested, you must break up each person to be rotoscoped into its simplest shapes.
My approach would be to go into Mocha and boost the gamma on your footage to see if there is some surface details on heads and backs of people.
If there is then start by choosing one head closest to camera that is never occluded by anything and create a very simple circular X-Spline (name it HeadA-track for example) WITHIN the boundary of the head at roughly half way along the time line. Track forward and back. If it tracked well, turn off tracking for that layer. Now go back to half way on time line and create another X-Spline for the same head (name it HeadA-roto for example) and this time roto the head carefully for that frame. Turn off tracking for this layer too and link it to HeadA-track. You might need to make some minor tweaks to HeadA-roto in “AdjustTrack” to fix drift.
Now continue the process for all heads and shoulders separately. Remember layer order in Mocha is vital whilst tracking since occluding shapes already tracked need to sit at the top of the layer stack. Work from objects closest to camera first ending with the train last.
If a head crosses in front of someone you might need to help mocha a bit during the tracking but once you get into the swing of it, it shouldn’t be too painful!
Graham Macfarlane
3D animator and VFX specialist
London UK