tutorial camera tracking voodoo,

dazStudio, blender, green screen

Purpose

Study camera tracking tools Daz Studio 1, 2, 3, 3

with an eye one compatibility with Blender

Create new tools along the way

Footage

Download a set of "plates" from

http://www.hollywoodcamerawork.us/greenscreenplates.html

the set named "MATCHMOVE TEST CLOSE"

it contains 307 plates in 1280x1080 format

hcw_mmtest_close.0133.png

Place these images in C:\TeleBlender\greenplates\MM Test Close

Resize those 307 images to the 1280x720 format, this slightly degrades the images but avoids having to deal with non-square pixels

Create a sub-folder named sqpix : C:\TeleBlender\greenplates\sqpix

install the free image processing utility imagemagick in c:\imagemagick

http://www.imagemagick.org/script/download.php

Run this batch file ( if you are not familiar with imagemagick nor with batch files, you'll have to use a video editor )

This batch file resizes all 307 images and places the result in C:\TeleBlender\greenplates\MM Test Close\sqpix

FOR %%a in (*.png) DO c:\imagemagick\convert %%a -resize 1280x720 sqpix\%%a

C:\TeleBlender\greenplates\MM Test Close\sqpix\hcw_mmtest_close.0133.png

hcw_mmtest_close.0133.png

Must be Voodoo

Install Voodoo camera tracker from

http://www.viscoda.com/index.php/en/products/non-commercial/voodoo-camera-tracker

Voodoo Camera Tracker (Version 1.2.0 beta, binary for Windows - Installer-version)

Start Voodoo 1.2.0 beta

Do a File / Open / Sequence

Browse up to the first image of the sequence :

C:\TeleBlender\greenplates\MM Test Close\sqpix\hcw_mmtest_close.0000.png

Specify "Free move" as the "move type" since the camera is not on a tripod

At this point it could be quite important to set the camera and tracking parameters,

( i didn't use Voodoo in a long time .... so i skip it :) )

Click on VooDoo's start button

VooDoo processes the 307 images

Do a File / Save / textFile

and File / Save / Blender .... Blender 2.5 and up

I let it export up to 1500 markers ( default )

name this file MMTestCloseFromVoodoo.py

also export a Text Version

File / Save / Blender

bane this file MMTestCloseFromVoodoo.txt

Using the voodoo-produced python script in Blender

Export a Daz Studio scene ( still, non-animated) to Blender 2.64 using mcjTeleblender

Change the "Editor type" of the bottom panel to "Text Editor"

in Blender's Text Editor, do a Text / open Text Block

Select the .py python script you generated using VooDoo ( MMTestCloseFromVoodoo.py )

Run it by clicking on the "Run Script Button"

visually nothing changed but in the scene hierarchy

there's a new "Voodoo camera" and a "Voodoo point-cloud"

Select the "voodoo_render_cam" camera in the scene hierarchy panel

in the 3DView Panel menus, do a View / Cameras / Select Active Object as Camera

Voodoo's point cloud should now be in-view

Select the point cloud to make it even more visible

Change the Editor type of the bottom panel to "TimeLine" press the play button

( unfortunately we immediately notice sudden jumps, not a good sign )

now we'd like to have the proper background images ..... how do we do that ...

we search youtube for blender animated background

and we find the method here: http://www.youtube.com/watch?v=a3Ocr4ubosY

Type N to make the currently-selected-object's properties panel visible

select the voodoo camera

set the background image to the first image in the sequence

We can see that the markers don't really fit, but are not too far off either

remember we did not make efforts ( at all ) to set the camera properties in Voodoo

i'm impatient and want to see results.

we'll pull Aiko ( the daz studio imported character ) into view

i turn off 'background images'

i set the render output to PNG, RGBA and in Film i click on "Transparent"

i render frames 0 to 307

frame 133

Using imagemagick and batchfiles i composited this render on top of the original footage

it gives a good idea on the unusability of this camera tracking data

we'll give it another go

Using correct Camera settings in Voodoo

after loading our image sequence in Voodoo

we go in File / Initial Camera

the default parameters

we change this to a type that better fits our footage

we let Voodoo re-compute the camera animation

export it in Blender format

import it in blender using the method discussed previously

this time ( since i figured it out ) we change the camera settings to get an animated backdrop

unfortunately with the Blender Cycles Renderer, this background doesn't seem to get rendered

but it's an excellent preview

now i render this and composite it using imagemagick script

Here is the result ! not bad not bad

Exporting camera animations from blender

We are able to get Voodoo tracking cameras in Blender,

later we may obtain tracking cameras from Blender's built-in tracking function.

in this section we'll use a brand new script to export Blender's cameras into Daz Studio

Beta Release Beta Release Beta Release Beta Release

you will find the first version of the Blender - to - Daz camera exporter, a Blender python script

place it in the Blender modules folder

typically C:\Program Files\Blender Foundation\Blender\2.64\scripts\modules

load it using a Blender "Text Editor"

select a camera in the scene, make it the current view camera

run the script

you will have to supply a filename, for example : camerafromblender.dsa

done

open or drag-and-drop this file in daz studio, it will create an animated camera named voodoocam

this touchy camera path was exported from Studio to Blender

then exported from Blender to studio and rendered in Harware render mode

Voodoo Blender Studio bridge

this time we start with a very controlled shot filmed in Daz Studio

Here is an overview of the shot

the frame rate 10 10 FPS

the camera rotates at a constant angular speed around ( 0, 0, 0 )

the angle range is 0 to -90 degrees

the camera rotates around its local X axis at a constant angular speed

the angle ranges from 0 to 10 degrees

the camera moves along its local Z axis going from 200 cm to 100 cm

Daz Studio has a filmback with a height of 35mm, the focal lengths are given in relation to this

for a 16x9 aspect ratio, this gives us a sensor size of 36 mm x 62.22mm ( 35 * 15 / 9 = 62.22... )

for this shot we maintained a focal length of 62.22 mm

which gives us a field of view of 53 degrees ( 180 * 2 * atan( .5 ) / pi )

by default Blender's sensor is 32 mm wide, the focal lengths are given in relation to this

the focal length in Blender will be 32 mm

----------

here you can see Daz Studio's axis system

Rendering the test footage

an empty Blender scene was created

the Cycles renderer was selected

a world environment was added, equirectangular mapping,

the environment map was set to Ditch-River_Env.hdr from the sIBL archive at http://www.hdrlabs.com/sibl/archive/

the output image type was set to PNG , RGBA, and the Film / Transparent option was turned on

this was saved as "untitled.blend"

The Daz Studio animation was rendered using mcjTeleblender and "untitled.blend"

result : amyGI0000.png, amyGI0001.png ... amyGI0119.png

the Green marker room was rendered using Daz Studio's Hardware renderer

result : amyroom000.png, amyroom001.png ... amyroom119.png

the two sets of images were composited using these two batch files

composite_all.bat

FOR %%a in (amygi*.png) DO call composite_this.bat %%a

composite_this.bat

set b=%1

set a=%b:~-7%

c:\imagemagick\convert amygi0%a% amyroom%a% -background none -compose DstOver -flatten amyref%a%

and i obtain amyref000.png, amyref001.png ... amyref119.png