Introducing blam

No Blender nerd will have missed the recent introduction of motion tracking, which provides a nice workflow for mixing video footage and 3D models. While awesome, the current motion tracking implementation is limited to video footage with significant enough camera movement and perspective shift and (as far as I know) there is currently no easy way of mixing 3D models with still images or fixed tripod shots, so I decided to put together an add-on for this purpose.

The add-on is called blam, The Blender camera calibration toolkit, and facilitates modeling based on still images.

The add-on and further information is available here. Note that blam is still in development. If you’re interested in contributing, just drop me a line.

16 Comments

  1. John F says:

    Haven’t even tried it yet, but I still wanted to say thank you. Trying it out has moved straight to the top of my to-do list. I am so excited about this! Thanks a million!

  2. Joster says:

    Thanks you so much!!
    I think it’s about time I delete SketchUp in my computer.
    Is there a way for non-coder to contribute?

  3. Oslo says:

    Weehooo!!
    Thanks a lot for this wonderful add-on. You have no idea how long I’ve been waiting for something like this. I was already trying to use the Tomato branch on still images. With no success :)

    Can’t wait to use it!

  4. Tungee says:

    Per, in future, could the calibration panels of BLAM in the UV editor could moved to the Movieclip editor? Just for the cosmetics ;)
    Man thousand thanx!

  5. Deepak Chandel says:

    Thank you so much for this addon…I’ve been looking for this feature for such a long time. Now I wont have to transfer camera info from sketchup to blender. A million thanks again.

  6. Works but ofcourse has the same problem with lens distorsion as other solutions. Better not try it on a photo taken with wide angle. Which is a problem for indoor shots.

    Any hints welcome.

    Carsten

    • Per says:

      Significant lens distortion will give less accurate results since the camera calibration algorithm assumes that straight lines in 3D space end up as straight line in the picture, which is not the case in the presence of lens distortion. Wide angle shots (i.e small focal lengths) should not be a problem, as long as the lens distortion is not too severe.

      I remember reading somewhere that an undistortion compositing node was on the cards for the motion tracker, you may want to dig up some info on that. For now, undistorting the image before using it in blam is probably your best option.

      Have you got any example images that cause the problem you’re describing?

  7. Here is what I did take as sample: http://dl.dropbox.com/u/4898693/IMG_2331.JPG

    Quality is not very good.

    I did try to mark x and z first and also x and y. After reconstructing (automatic did not work for me) the reconstructed wall did not match in both cases. (see upper left corner and the edge bottom left)

    http://dl.dropbox.com/u/4898693/Bildschirmfoto-13.png

    Maybe its not the lens distorsion but my fault (very likely ;-) . Anyhow, thanks for your help.

    Carsten

    • Per says:

      your image does have a bit of lens distortion, but I think the accuracy could be improved by adjusting the grease pencil strokes. the lower left short red stroke looks a bit off for example. i’ve created a wiki page with some tips that could improve the calibration accuracy. http://code.google.com/p/blam/wiki/TipsAndTricks

      what happened when you tried automatic reconstruction?

  8. I think my strokes are quite ok, the screenshot does look a bit off but it is not.

    I tried with less lines but get the same result. However now the automatic reconstruction worked (but with same error as the manual reconstruct).

    Carsten

  9. VERY NICE! They need to tack this onto the front of the motion tracker workflow. Any chance you could reconstruct faces from grease pencil marks to avoid having to add geometry to jump start the whole process? Or at least take the grease pencil lines that were drawn and turn them into starter geometry to build from. Perhaps a nice checkbox to include it as an option?

    • Per says:

      Thanks!

      Using grease pencil strokes to define the faces to reconstruct has two drawbacks compared to using a mesh: there is no way (that i know of) to tweak and move grease pencil strokes after they have been entered and there is no (easy) way of defining face adjacency relations, i.e what faces are connected through what edges. Considering this, I think the current mesh workflow is less tedious except possibly in the case of a single face.

      Turning grease pencil lines into edges in 3D should be possible in theory and I agree that it would be convenient for modeling. This is on my list of stuff to (try to) implement, but has lower priority than ensuring the robustness and correctness of the calibration algorithm.

      I do agree that it makes sense to make the calibration workflow more similar to that of motion tracking. Moving the grease pencil calibration stuff to the movie clip editor is probably a good start, especially considering that blam could also be used for fixed camera video shots.

  10. chris mcfall says:

    This looks great, would be invaluable in my workflow, perhaps a rename is in order though, Might I suggest “Photo-synthesis”…. Yeah I know everyones a critic. good luck with the dev can’t wait to see the results.

  11. Grzesiek says:

    Hi.Thanks for this tool.
    What version of Blender I need to work with? I’ve installed it, used two layers Grease pencil but there is no Camera calibration part and i can’t map my layers to axes.
    I’ve worked along with tutorial video.
    Thanks for help.

  12. Karlis says:

    I think they should implement this in Blenders motion tracker to set camera focal length if you don’t know what it was when filming. PFTrack has similar functionality.. you can set a 3D cube on the picture.. place its points in right perspective.. and PFTrack calculates camera focal length from that.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">