Photo composition

Hello all!

I’m looking for something that I don’t even know how it would be properly named, so forgive the unclear thread title.

My goal is to take a photo (of a street, country side, house, anything) and add objects to it using blender (a simple cube for starters). Obviously the composition will be done using the composite nodes. My real problem is getting the camera setup right, so the cube will appear at the right angle, appearing parallel to the street, with the right perspective, etc.

Is there a way to use hints from the photo to set up the camera? Like if there’s a street on the picture, I might know that both sides of the street form parallel lines, or the fact that house walls are orthogonal to the street. Given enough information I should be able to reconstruct the camera position, isn’t it?

Anyone know of a tutorial or other information about how to go about this? Thanks a lot.

This would be probably called a still composite, so you are pretty much correct in your ‘photo composition.’ There is a tutorial for this although for an older version of blender which doesn’t use the composite nodes at all (although it may be better to use them, I’m just not sure how). The compositing tutorial is here. You may have to play a bit with the buttons as they may be a bit different than the current version, but should be just what you are looking for.

Here are a couple links to my composite attempts:


It’s certainly fun to do, but the quality of it depends greatly on your light setup. Anyway, good luck with it and let us know how you make out!

Thanks a lot for the link! While a bit outdated, this tutorial is still very useful.

However, it just says “Move it [the camera] around […] until it looks like the new plane lines up reasonably well with the floor in the background picture”. I was rather looking for some way to geometrically reconstruct the camera position to get a more accurate setup. But now I also realize that maybe I’m worrying too much about this. Having quickly tried to follow the tutorial, it seems that getting the lighting right is far more important than a perfect camera alignment.

Thanks again. More input on this is welcome.

While I’m not super experienced in composition, I’d say lighting is extremely important. I think that lining up the object and plane is just a matter of moving, doing a quick render, moving again, etc., until you get it right. It’s tough to make your object match the picture’s plane, to make sure it doesn’t look like it’s floating, but I don’t know of any mathematical way to line them up. Sorry about that!

If you have your photo loaded up in your camera view background, then you can switch to shaded drawing when you get reasonably close to position so that you can adjust you light source to a similar angle. You can also select your camera and hit the “.” period button to swap your pivot to the cursor position, which is default at the cube. Snap it back to the cube if not, and when translating your camera in ‘Z’ your camera view will rotate around your cube.

Just some thoughts on this - I used this set up to copy an object from a photograph that was in perspective, and used separate cameras for different photos in perspective to compare proportions.

Thanks for the additional replies!

I had another try at this: I rendered a simple 2x2 plane and saved that image. Then I started a new scene and loaded that image as background and created a new 2x2 plane and tried to align the camera so both planes would line up… I didn’t find a way to do this precisely and even ‘guessing’ a good position is not easy.

But I’ll now concentrate on the other tricky parts of the composition.