however when things go wrong in a 3d track im a bit confused as to how to deal with it....
Then don't. The simple answer would be to move on to greener pastures and use other tools like mochaPro, SynthEyes and so on. Since all solves in AE's tracker are arbitrary with no respect to world space alignment and otehr things, it would be a nightmare to fix a botched track by manipulating the camera keyframes. On the other hand there may be hope for you yet by not using tracking at all for the inbetween segment. Rather try to reconstruct the scene using 3D layers based on still images and then blend between your 3D version and the real thing. Adding directional blur and so on surely can help disguise this. Otherwise you may have to re-shoot and do your pan much slower, then accelerate it in AE after tracking.
I would trim the shot buy splitting it at a point exactly one frame before you first see the window. Then I would track only the part of the shot where you are dealing with the window in Mocha. Use all of the options and overlay a grid to make sure you get a good track. You'll probably have to track in reverse. I'd overlay the 8 X 8 grid to make sure that the window is perfectly tracked.
Now back in AE Duplicate your switch pan layer and pre-compose the top copy. Open the pre-comp and add Corner Pin and CC Power Pin to the layer. Use the pickwhip to tie all of the corners of the CC Power Pin effect to the Corner Pin effect on the layer above. Turn on Expand in the CC Power Pin app and turn off Corner Pin.
Back in Mocha you can expand the edges of your surface by dragging them out so you see a bit more than the window. If your track is perfect then you can copy the corner pin data to the clipboard, go back into AE, select Corner Pin effect in the Pre-comp and paste. Your comp will now expand and fill the frame and the window will be stabilized in the shot. The comp is going to look all weird but that's OK.
Return to the main comp and select the pre-comp layer and paste again and the comp should return to normal.
Now go back to the pre comp and add your footage of the curtains on top of the stabilized and corner pined footage. You can add masks, blurs and anything else you need to do to get this composite to look good. When you get things looking good you can turn off the visibility of the bottom layer. Check back in the main comp and your curtains should perfectly fit into the window and track perfectly. All you should have to do is animate the blur and color grade the pre-comp to match. Here's a frame or two of a tutorial I am just about finished with that shows the technique.
You can add anything to a shot this way and it's by far the easiest way to do the track and composite you talked about. The UPS truck is followed from right to left, has reflections pass and everything looks real, including the motion blur. I hope this helps. Look for the tutorial soon.
this is a fascinating work around rick ! where does one find your tutorials?
small question regarding 3d tracks....does it matter which track point you choose as a reference when you "create camera"?
as in, will it create a different camera path?
This isn't really a work around, it's an industry standard production workflow that involves stabilizing the motion in a frame so you can work on it and then putting the motion back in the frame. It's been done for years. Compositing has always been about generating mattes and matching movement.
I have a few short basic techniques explained on YouTube. Some have sound, some are silent. They are just quick things I did to explain some really basic stuff. Search RGEffects. Make sure it's all one word. I'm also working on an ebook and a bunch of tutorials that are much more in depth. They will be available fairly soon. I'll also offer subscriptions to training.
Here's a very simple explanation of how to do Camera Tracking. Camera Tracking is actually quite new to the VFX world. Not all shots will work. Replacing eh logo on the truck would not work at all for camera tracking because the truck moves in the frame. If the truck was parked you could use camera tracking and it wold give you some other options.
Here's the quickie: