See how the pros do it. This is from Siggraph 2013:
Robert Hranitzky demonstrates the Cineware workflow with After Effects CC and CINEMA 4D Lite. In this presentation, Robert demonstrates how to generate a 3D camera track in After Effects, transfer that track to CINEMA 4D, and incorporate C4D elements using Cineware. You’ll learn how to mask and layer footage using the After Effects CC Rotobrush tool. Robert shows how to extract lights & cameras from the C4D scene file and use Trapcode Lux to create a volumetric effect. Finally Robert adds a 3D helicopter from C4D and demonstrates how to create motion blur in AE for the rotors.
04:11 3D Camera Tracking
16:14 Masking with Rotobrush
22:42 Extracting C4D Scene Data
47:20 Lens Flare & Color Correction
See the tutorial here: