Camera Projection - a great way for integrating 3D with live action - by Andy Boyd


Using camera projection mapping to project footage onto a surface and then distorting the projected texture by animating the surface is a technique that has been around for ages. In essence I guess you could think of it as a fancy 3D warper. This technique is particularly useful in commercials where you don't have much time and the image resolutions are not so large. The reason I'm putting together this tutorial on camera projection is because whenever I suggest it to a newcomer, I'm met with the response, "What....I don't get it....isn't that cheating?" Cheating! I like to think of it as being clever. It is not always the appropriate technique but when it works it can really save time. The technique of camera projection is to project footage from the point of view of the camera onto an object. Next, create a texture reference object for the selected surface to lock the projected 2D texture to the surface. ( In other packages you can 'bake off UV', lock the UV's or write out a new UV texture map.) As the surface animates or deforms, the texture also deforms accordingly.

For example in Maya - see movies at bottom:

Set up a camera by setting the Film Aspect Ratio to match your source footage. [For example PAL( 768/576 = 1.333) Remember if you are working with 720x576 source footage and rendering 720x576 with Pixel Aspect Ratio set to 1.0667 in your render globals still use a Film Aspect Ratio of 1.333 as (720/576)*1.0667 = 1.333]

Set up an image plane for the camera by selecting Environment > Image Plane > create under the camera shape node (PerspShape in my case). In the image plane set Placement > fit > To Size and click on fit to film gate

Create a sphere

 

Create a new 'file texture' as projection. Select the same image that you are using for your image plane then plug it into the colour of a lambert. Select perspective under projection type and then select the correct camera under link to camera.

Now plug the projection into the incandescence of the lambert and make the colour black, constant shaded. (If you get blury edges try turning filter type to off in file attributes, if your texture does not match exactly make sure that the image plane and camera are set up correctly. When rendered the sphere should match your image plane.

Create a texture reference object, Texturing > Create Texture Reference Object. Animate the original surface (not the reference object). The texture reference function locks the texture to the original surface using the new templated surface for its UV texture placement.

example:

Take this footage of these cows.

I select one frame and position my 3D cow to best match the position of the real cow

I take the frame I matched and photoshop it to match the 3d cow.

I use this painted up frame to camera project onto the 3d cow. I could have created a texture reference object of the cow at this stage, but I modelled the cow with subdivs and texture reference objects do not work with subdivs (not for me anyway). So I baked of a file texture with > in Hypershade, select Edit > Convert to File Texture. Below is the new texture of the cow on the right. I had to paint this texture further (flip the head onto both sides and paint in the bottom of the cow).

The textures on the rendered cows.

Cow dig quicktime6.6Mb or Cow dig Avi 0.9Mb (needs Divx) Cow Climb quicktime3Mb

limitations: camera projection generally works best when rendered for the same camera that it projecting it. From a different view things don't look so pretty as can be seen in this Avi 1.0Mb (needs Divx)

 

back