I'm trying to add 3d objects into my video that appear to "float". However after tracking the camera, the 3d objects that I have inserted show through foreground elements that I want to block it. I'm assuming that creating a solid for foreground elements would be the way to do this. But how do I create a unique solid that relates to this element as the camera "pans or rotates" around it so that it hides the 3d object until it comes into view? Most of my foreground elements that I want blocking the objects at certain times are people. So the solid would need to fit the contour of person's shape.
Why would you? That's stuff you do with conventional 2D masking. You just need to structure your comp accordingly and use pre-comping to isolate the different planes in the scene.