2011-12-15

3D to reality with Blender.

3D to reality means that I am placing virtual 3D object to real footage.

My virtual 3D object is an existing "Church of St. Gertrude" in Kaunas, Lithuania. I have generated it from photos, using Photofly software. I couldn't create all model in one scene so I had to combine separate scenes into one using 3D modeling software. I've used Blender. 
You can find more information on generating models with Photofly in my previous posts: "2D to 3D with Photofly. Introduction" and "2D to 3D with Photofly. 360° Building model". My aim is just to demonstrate the technology. If You want to try it Yourself, or to learn more about working with Photofly or Blender, there are plenty of video tutorials online.
Here is a short snap of a church model created with Photofly and imported into Blender:


This is original footage:

Next step - placing church into footage.

My 1st method:
1. Convert footage (.mov) to image sequence (.tga). 
2. Detect 3D and camera points using motion tracking software. I've used Voodoo tracker.
3. Export 3D and camera points. There are several options to export (for 3Dmax or other software). I've used Blender Python script (.py).
4. Import original video and 3D points into Blender (or 3Dmax).
5. Make some necessary adjustments.
6. Render the video.

 Good thing about voodoo tracker, is that it tracks camera and points automatically, but You have to convert video format several times, which can cause video quality loss, and the work process is not very fast. You have to make sure to stay with the same frame rate every time You convert Your footage. But for me, something still goes wrong when importing everything into blender. In the first part of a movie, things go quite well (obviously not perfect), and then camera just jumps off, and after 500 frames camera and track points becomes completely lost.
Here is a short low quality render to demonstrate:

I have tried many different ways to convert footage to .tga, different import/export settings within blender, with no result. To conclude, I think that the software may work fine, maybe the scene with a lot of trees were too complicated. Most likely it's because I'm doing something wrong, but I don't know what and I find it too long to ascertain.
After some time of making other stuff with blender, I found out, that voodoo tracker  and other motion tracking software has issues with camera movement.The footage is recognized when camera moves like an orbit (tripod) or along some path, but software can't handle both movement methods at the same time.

My 2nd method was quite the same, difference was to track motion using tomato motion tracker, but later I found out, that blender will have its own motion tracking technology (or some already existing, only integrated in base install package). Actually a new 2.61 version of blender has just released (I've got a tweet while writing this post :) And there are more interesting features to try out.


There also are some other things I would like to test in this current scene, so I'll post the final result after that.





I'm sure You have other methods to reach the result, so feel free to leave a comment at the end of this post.

No comments:

Post a Comment