DrPetter's homepage


I had an idea for a tool that would help with the process of building 3D models from reference photos. The first thing I did was to sketch a descriptive plan of what I wanted to accomplish, so a suitable introduction is to look at that picture:


Step 4 is written in red since I anticipated it to be "the hard part". I ended up using a kind of monte carlo jitter process where initial guesses at camera positions were successively altered in a random fashion, and the resulting fitness of each variation was measured and minimized (by discarding and rolling back unsuitable changes). The error was based on the closest distance between rays shot from each camera through manually placed keypoints for the corresponding view.


In an ideal situation, with all cameras placed with the exact 3D location, orientation and fov/zoom level as was used in taking the photos, all rays would perfectly intersect at the correct 3D points, and there would be zero error. For a number of reasons, this couldn't happen in reality, but the algorithm was good enough that it would produce useful results in many cases.

When you were happy with the results (after placing points, calculating (which took a few seconds), inspecting and possibly adjusting points), you could export the whole scene as a Collada file, which stored all points as vertices and also created cameras calibrated to represent each photo view.


At that point, you imported the Collada file into Blender and set up each camera view with the proper photo as a background image, and you could connect the vertices with lines to make it a bit easier to interpret. From there, you would proceed with making a model guided by the points and reference images. Typically you wouldn't actually use the real points, but rather build new geometry from scratch, using whatever symmetry or other tools you'd need.


The background images with properly aligned cameras turned out to be most useful since you could adjust your shapes as seen from different angles until it was accurate in full 3D.

Sometimes the results were a bit off in one or two views, and you had to compensate or move the camera to make it fit better. Limitations in the camera model might be responsible for some of this, but I think there were something else which ended up "accepting" invalid results in some cases. Usually with these things, the hardest part is designing a good error function that will guide results consistently toward the expected outcome without getting distracted.

I used the thing to make a pretty successful female head. Definitely much more advanced a model than I had ever attempted previously, and helped a whole lot by the reference setup. It was nice having something to work with as opposed to starting out with a blank space and some random separate images to look at.


As you might infer from all the past tense, this was made a while ago, and I don't think the final version is useful enough to warrant a public download. If you are really itching to try it though, and don't mind pain and disappointment, you could email me and I'll see if I can find something for you that will at least run.

Back to all projects

Page updated on March 25   2010