For this post, I’m going to give you an overview of how I added a wall of boxes into some video footage of my garage. To get started, you’ll need some footage that you want to add elements too. I shot my scene handheld which makes tracking a bit more difficult. To keep things simple, you can use a tripod and add in camera shake after everything is composed. If you do want to use a handheld shot, try and add some high contrast tracking points. These can be taped down markers or simply objects in a scene that stands out from the background.
Tracking the Footage
In Blender, go to the Motion Tracking layout and open your image. Go to the Toolbar Tab Track / Clip and click Set Scene Frame. This matches your blender timeline to the video clip.
Now to add the tracking points go to Markers Tab, choose Detect Features to automatically find points, or manually pick your points by choosing Add and click on what you want to be a marker in the footage. Try to add 10 or more markers. You can always delete the ones that don’t solve cleanly. Once the markers are set you can track those points by clicking the track forward button on the timeline.
Solving the track points
In the Solve tab, toggle on Keyframes so that Blender chooses the keyframes for you and the click the Solve Camera Motion button. Once the solve is done you’ll see the Solve Error range in the top right of your viewport. Try and get the error under 0.5 by deleting any tracking points that drift or go off target. You can also look at the waveform and select and delete and points that don’t fit the main motion path.
Once you are happy with the solve error. Go to The Scene Setup and click Set as Background. This aligns your video footage with your camera.
Defining the scenes axis
With everything tracked, the video footage and camera movements match but Blender doesn’t know what way is up. To align the axis of the scene to the footage, go to the Orientation tab, choose 3 points on a flat surface, and choose either wall or floor. Obviously pick the option that fits your scene. For my footage I chose Floor. Next, check your 3D viewport and see if things align right. If it’s giving you trouble, try choosing different tracking points and reapply the Orientation.
Modeling the scene
Now that the technical work is out of the way, it’s time to start modeling things. For my scene i’m adding boxes inside the garage so we will need to model anything that will be between our 3D props and the camera. That means the walls and garage door. After that you can add in your props.
A big part of making your 3D objects fit the scene is to make sure your lighting matches. How you set up your lights all depends on your footage. Do some side by side tests with your basic geometry and compare it to your footage until you have something close. Pay close attention to how defined the shadows are.
Getting ready to render
The last part before we render it to hide the rough geometry while still keeping that cast shadows. To do this select your geometry, go to Object Properties, Visibility tab, and toggle on Shadow Catcher.
Now render out your scene and see how it all went! If you want to see you can also render out the scene without the footage and composite it in another program like after effects but that’s for another post.