Welcome to our first Tutorial!
Hope you're as excited as we are to get started!
The purpose of this tutorial is to show an experienced Blender User how to convert a single photo of a scene into a 3D scene which can be edited or have special effects applied to it or move the camera around within. It provides a basic example application, an empty room. Once your have applied the technique a couple of times, you will be able to apply it to almost anything. Once mastered it can produce industry quality effects.
The example image presents a near perfect image to work with due to its simple geometry. You can use this image or you can use your own, it's entirely up to you. It's recommend to use the example image first and then experiment with your own.
Example Image:

Step 1:
If you wish to use the example image then you will need to save the image on your computer. Either right click on it, and 'Save Link/Target As' or left click on the example image, open the picture then save. If you wish to use your own then an image with simple geometry and flat surfaces is most suitable. Place your downloaded example image or your own image in an easy to access location.
Now that you have your image in an easily accessible location, start up Blender. Delete the default cube that appears and generally clear the space to work in. You can delete the default light if you want.
Step 2:
Press the '0' key on the numpad to bring up the camera view. What we want to do now is use the image you have chosen as the background image of the camera. In your '3D view' window go to 'View' → 'Background Image...' → 'Use Background Imag' → 'Load' and find the example image or your own and load it.
Step 3:
This next step is an art which needs practice. We are going to put in a simple 3D shape and basically paste the image from the camera's point of view onto the 3D object. Therefore to do this we need to create a 3D shape which matches the shape of the room and place the virtual camera relative to the virtual room so that the view mimics the real camera position relative to the real room. You'll notice with the example picture that there is a corner in the room which makes a perfect right angle on the floor and walls. This is given information which we know which can be used to reconstruct the scene and the camera position.
 |
|
The walls and floor make right angles. This makes for a perfect guide to use as it is gives as a guide to use when positioning the camera. |
 |
|
If we insert a plane and just tweak the 3D cameras position until the edges of the plane match the edges of the floor, we can match the real camera position and the virtual camera position almost perfectly. As a bonus we can use the plane edges to extrude upwards to make the walls which can be used to recreate the scene. |
Go to the top view (7 on the numpad), insert a plane, ensure it is flat, not rotated and is positioned at 0,0,0. Scale it to match the desired size of your scene. Now just pull up the camera view again and start moving the camera around trying to match the edges of the plane to the edges of the floor in your photo. What we are doing is using the information we have (the shape of the floor and walls) with our guide (the plane) and using the photo (which we set to the background of the camera) to determine where the virtual camera should be.
Experiment with moving the camera in all directions and rotating it on all axis's. Once you get the hang of this trick of matching the guide to the photo you'll get faster at doing this again in the future.
If you're still not sure of what I mean then maybe having a look at the screenshot below will help.
Screenshot of an almost lined up plane and photo.

Step 4.
Now to finish off this scene we need to use the rest of the information we have to make the walls. We also need to make the doorway. That will be a simple modelling task.
TIP: A very handy tool can be found with the 'Ctrl-R' key combo. This tool in edit mode allows you to subdivide through edges, and even choose the number of cuts with the scrollwheel of the mouse. If you only make one cut with the tool then it will give you the option of sliding it after it is made. This is an excellent tool to remember and in some situations can save you hours of work. I advise anyone who hasn't heard of it to try it out and experiment to get the hang of it, very handy tool and with practice it becomes even more powerful.
Right now we have a plane in the scene which matches the shape of the floor... but in the photo there is a door or hall of some form. This is the reason it was recommended to use this picture for this tutorial, because it has very simple geometry to recreate, but with a small challenge to make it worth doing.
We want to extrude the edges of the plane up to make the walls, but we also need to extend the floor where the hall is first. Select the plane and go to Edit Mode. Using the above stated tool you can make a cut in the floor to create the points where the hallway starts in the floor. Then just extrude the edge of the hall outwards away from the floor, while keeping it flat, you should now have the hallway floor. Now just extrude the edges up to make the walls, go straight up or it won't look right ;).
If you're confused, have a look at the screenshot below and hopefully the instructions will become clearer.
Screenshot: Modelling all finished, just need to texture the walls and floor. Click to enlarge image.

Now at this point your photo most likely will not match the shape of your 3D object. Don't worry it's not because you've made a mistake, this is likely to happen on most things you try this technique on. The main thing which causes this is the difference between the lens of the real camera and the lens of the virtual Blender camera. The solution is to now adjust the virtual camera lens until you think you've got a closer match to your real camera lens, then repeat step 3. In this particular situation changing the virtual camera lens to 55 and a minute of tweaking the camera position can easily fix this.
Screenshot: Click to enlarge.
Step 5.
We are almost finished! :D
We must now texture this scene. To texture the scene we need to somehow apply the texture of the photo directly to the object from the view of the camera. To do this we go back to the camera view (0 on the numpad), select the 3D object we made and go to the 'Buttons Window' and select the 'Make' button next to the word sticky in the 'Mesh' section of 'Editing' panel. This will create a UV map for our photo so that it is textured straight onto the object from that view point of the camera.
Now head over to the Shading section and the Materials tab, create a new material for your 3D object (which should still be selected), set the material to 'shadeless'. After this you go over to the texture button and load the photo as a texture. Then just simply head back over to the Materials button and over to the map input panel and choose 'Stick' for that texture. Now your photo is mapped from the camera view onto your object.

Well Done! Now you're finished and can experiment with your new toy. Try moving the camera around the scene a bit and rendering the results, or maybe try putting objects in the scene. Piece of advice though, you may have spent a while lining up the camera so don't move the camera without first saving the position somehow (maybe save it as a keyframe). Otherwise it will be near impossible to get the camera back to the exact spot you had it.
What next?
There is an example movie and image (which can be found in the portfolio). These show 2 possible things which can be done next once this tutorial is complete. You can add objects to the scene, even reflective objects. You can also move the camera around and view the room at an entirely different angle. Mostly just try and have fun with it, experiment. Once you have an idea of what you can do with this technique you'll see a whole host of photos that you could apply it too to achieve some cool looking effects.
You may notice that in the example movie and image the photo does not tile itself over the whole object. To create this yourself you must go to the options for the texture in the 'Texture Buttons' tab and 'Map Image' panel and enable 'Use Alpha' and 'Clipcube'. Then in the 'Material Buttons' tab in the 'Map To' panel enable 'alpha' and select 'Multiply' for the blending mode.
Confused?
If you're in anyway confused over any part of this tutorial, or can't see the pictures or think there is a better way of doing any or all of these steps then please feel free to send me an email at mindinsomnia@gmail.com. Alternatively check out the tutorial in 'Related Tutorials' below to see a video tutorial that may explain it a little clearer.
Also if you wish to see an already completed version, you can download the .blend file for this tutorial. Click Here to Download.
Related Tutorials
This same technique can be applied to other shapes as well, not just solid flat structures. It also doesn't have to be an indoor scene. For a very good tutorial (better than this one in my opinion) on how to use this technique on mountains check out "Camera Mapping in Blender" over at Peerless Productions. Excellent site with top quality free video tutorials for download.
Download
You can download this tutorial as a pdf. Click here to Download.