Tracking and camera solving

VFX – Tutorial for Blender 2.81

You may use Blender 2.80 as well, or any other versions (2.79, 2.82, 2.83 or other branches). I just found convenient to use Blender 2.81 which is relatively stable and has pretty good options.

Example in this tutorial. Left is single frame before inserting 3D object, and right is frame with 3D object, all reflections and added shadow:

Also, the final video is here:

In this tutorial, we will track front face of the building, set ‘floor/wall’ and add some object to combine video with 3D scene in Blender. There are few versions – complex one with adding shadows, reflections and everything else. But I will also include simplified version.

I will start with essential tracking, camera solving and making simple 3D scene – which will be then combined with video example (included in this page) by using compositing nodes. So, first part of the video will be as simplest as possible. You may watch just that part of the video, or continue as things become more complicated. Or, you may back at any time and watch the rest of the video with more and more complex 3D scene, and more complex compositing.

If you want, you may use your own video and image examples, but I am trying to offer you the best quality material as possible. That means, low amount of motion blur, relative low amount of camera shaking (working on it), sharp photos and videos and so on. Also, I will try to include all other material and guides for easier following of those tutorials. If you spot something missing, feel free to comment on this post, and/or video tutorial on YouTube.

HDRI image is not needed if we do only simple scene, but if we use reflective 3D objects, then it is good practice to use ‘ambient’ or ‘world’ node in shading part of the Blender.

Media files for test tutorials that can be seen on my new YouTube channel. This one is without sound. :

Download example here – Common Creative licence – Reuse allowed

Click on the link, then after video starts, right mouse click and chose “Save video as…” . Save video to your working folder. You may use this video for your videos, YouTube tutorials or whatever you want.

HDRI photo for this scene in Blender:

Panoramic view for the "world" in blender
Panoramic view for the tutorial – free for use (CC – reuse allowed).

Click on this photo and right click and chose “Save image as…” . Save image to your working folder. This panoramic view is free to use for your tutorials, or whatever you want. It is Creative Commons licence – reuse allowed.

Compositing nodes

Node tree for this example – complex tree (it may be reduced). :

Complex node tree
This is complex node tree with included foreground, background and Denoise node.

The same complex node tree, but this one is inverted, so ‘printing friendly’. You may download this image, print it and use it as a reference for constructing your node tree. :

Complex node tree - printing friendly
You may use this image and print it for your reference during making compositing nodes.

The same rules apply; click on the image, then right mouse click and chose “Save image as…” and save it in your working folder. Whatever is easier to you – watching previous image, or print inverted version (less tint/toner consumption).

Even more complex situation, where we back and distort image again to fit the frame:

Even more complex node tree
Even more complex node tree – added distort, so that image fit full frame without transparent border.
more complex node tree
Even more complex node tree. Inverted for the printer.

Simplified version that ignore (removed) ‘undistort’, ‘scale’, and two 3D sub-scenes (‘foreground’ and ‘background’):

Simpler version of node tree
Simpler version of node tree. ‘Undistort’, ‘Scale’, ‘Distort’ and one of two scenes removed – remains only foreground.

And, the same node tree, inverted as a ‘printer friendly version’:

simpler version
Simpler version of the node tree – inverted for printing purposes.

And the simplest version with noise reduction (denoise) removed. That is ‘bare minimum’ for VFX work to combine ‘real world’ and ‘3D world’. :

the simplest version
The simplest version of the node tree – removed noise reduction node (denoise).

And again inverted version for printing.:

the simplest version - inverted
The simplest version – inverted.

Shading nodes

We are not yet done with nodes. Above are nodes for compositing, but now follows node for shading. First one is HDRI image that gives us source for reflection of the metal ball (3D world).:

shading node tree - world
Shading node tree for the ‘world’ with HDRI image.

Note cropped part – that is our video file combined with ball from 3D world, the rest is HDRI image. Middle left on the picture says “World”, that is HDRI image that can give us illumination for 3D scene and source of image for reflection, in this example for metallic ball inserted in front of the building.

Inverted version for printing:

shading node tree - inverted
Shading node tree, this time inverted for printing.

While HDRI image gives us reflection of metal ball outside, building itself may be grey if next shading node tree is not used (no relatively accurate reflection of the building itself, outlined with orange outline):

shading node tree - facade of the building
Another shading node tree for the facade of the building.

The same shading node tree, this time inverted:

shading node tree - inverted
Shading node tree for building facade – inverted for printing.

Shading node tree for sphere and window close to sphere. Both are metallic and with low roughness (very reflective). I will not post separate shading node tree for the sphere and for the window – they differ only in ‘base color’ – window is darker so that reflection matches reflections from other windows. Metallic ball is highly reflective, while glass is slightly reflective. Base color if darker gives us exactly that small amount of reflectivity (outlined orange):

shading node tree - sphere
Shading node tree for sphere which is highly reflective. Window close to sphere has similar node – just different base color, much darker.

The same node tree, inverted:

shading node tree - sphere - inverted
Shading node tree for sphere and window, inverted.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.