Here, for fun, is a short tutorial on how to turn a 2D photograph into a 3D animation using Maya camera mapping. The move you see is entirely virtual. This technique forms a useful basis for "view-dependent texturing" of foreground objects, as well as for imposing a 3D move on a 2D matte painting background.
UPDATE 4/18/2009: The high res photos are on flickr for you to play with.
Here's a simple photo of a cardboard box sitting on the floor. (hi res version on flickr)
Here's a "clean plate" of the floor alone. I retouched it a bit in Photoshop to let a little of the original box remain around the base. This little trick lets me be a little sloppy in alignment later on. (hi res version on flickr)
Using measurents from a ruler, I match model a virtual box with the same proportions. I don't sweat the details (like the folded cardboard flaps on top) - I keep it simple.
I create camera 1 and position it so that the 3D wireframe box I modelled lines up with the photograph of the box.
I create a second camera -- camera 2 -- and match it precisely to camera one by editing its attributes, and by using point- and aim-constraints.
I use "perspective projection" from camera 2 to project the image of the box onto the virtual box. I use the same camera to project the "clean floor" plate onto a matched position virtual floor object.
To eliminate blurry mapping artifacts on the box, I found I had to turn off filtering in the file node.
The trick of this project is to decouple camera 1 from camera 2 -- to break the constraints so that the projecting camera and the rendering camera are no longer in the same place.
Notice how my original box photo shows three sides visible on the box. When designing my animation, I purposely chose an initial position that hid one of the three box sides, and revealed it over the course of the move. The reveal of the third side makes for a fun, unexpected surprise.
I first started using camera mapping in in the Eighties, although the technique itself was already well-known to some in the CG world before then. The concept of camera projection is older than CG itself, and was used to great effect in analog form in the theater world for decades.
When the photograph matches the foreground object, and when the projection can be made to "stick" to the object while the object flexes (through reference objects, or projection of UV's into vertices) then camera projection can be used as the basis for creating view-dependent texture maps.
When the photograph matches the background, it can be used to impose a 3D move on a 2D matte painting.
When the photograph contains an object with no matching 3D geometry, (as it does in this test I tried in 1992) the photographic object can appear normal when viewed from one place, and "painted on the wall" or "cast like a shadow" when viewed from another place.
Conversely, when a 3D object exists but is not represented in the photograph, the 3D object can, when viewed from the right place, vanish like a chameleon into the background. Look at the character "Reptile" in the movie Mortal Kombat, to see this technique in action.
Here are some fun "real world" examples of the principles of camera projection in action:
Felice Varini: Denial of Perspective