how do you put animation in live film?

i want to make a movie that is real film with animated characters in it like Ted or Garfield so could someone tell me how with a tutorial or something please:)

Moved from “Animation and Rigging” to “Compositing and Post Processing”… because this forum is a bit better for detailing the answers to your question.

Look at Andrew Price’s tutorial where put a hole in the ground. The concepts are exactly the same.

Consider how football games have a yellow line across the field where the line-of-scrimmage is, and “X yards to go” graphics and so-forth. This is done by being able to precisely locate the cameras in 3D space and to obtain in real-time exactly where they are pointing and with what lens. A computer, also in real time, generates the images. Furthermore, since a “blank frame” of the field was shot ahead of time, the computer can subtract the players from the field, then composite them back “on top of” the generated yellow line such that the players actually occlude it, and even appear to cast a shadow upon it. If desired, the lines can be made to truly appear to be painted on the grass.

In CG film-making, this is actually done in a slightly different way. Since the camera’s position is often “hand-held” in a live shot, distinct markers (dots, circles and so-forth) are placed into the scene when the live-action is shot. (Or, distinct areas of the footage are used, or most likely, both.) The f-stop and other lens parameters of the camera must also be known. Armed with this information, Blender can “track” the various markers in order to determine the physical camera’s movements in real 3D space, in order to then cause the virtual Blender camera to do the same thing. Once this is done, and done successfully (it can be quite a chore …), 3D digital effects can be merged into the live-action footage. Such as creating a hole in the pavement with a circle of cracks around it in Andrew’s tutorial.