Skip to content

Commit

Permalink
finish video tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Meech committed Sep 11, 2023
1 parent 4b696cd commit f0ff65b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ For more information on the Perspective-n-Point process, see OpenCV's documentat

- For installation instructions, see: [Installation](./docs/installation.md)
- For a step by step tutorial of image matching, see: [Image matching tutorial](./docs/image-matching.md)
- For a tutorial of making a video moving between each matched position, see: [Video tutorial](./docs/video.md). Note: this tutorial is advanced, and assumes prior Blender experience!

## Releases

Expand Down
Binary file added docs/images/camera-keyframes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/copy-attributes-addon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/track-to.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ For each 2D image:
- Move the timeline playhead to a new time
- Find the camera associated with that image (it will be inside the 'image-match' collection, then inside the collection with the same name as the image)
- Copy the Location and Rotation of this camera to your animation camera (The 'Copy Attributes Menu' addon can be useful for this - go to Edit > Preferences and select 'Add-ons' on the left. Then search for 'copy' and enable the checkbox next to 'Interface: Copy Attributes Menu'. Once done, you can click on your animation camera, then shift + click the camera you want to copy the location and rotation from, then Ctrl + C and select 'Copy Location'. Then again, with 'Copy Rotation')

![Copy attributes addon](./images/copy-attributes-addon.jpg)
- Set a keyframe for location and rotation (Select your animation camera, press I on your keyboard and select 'Location & Rotation' )
- Open the camera panel and set the Focal Length and Sensor Height (under Camera dropdown) to match the image camera.
- Insert keyframes for Focal Length and Sensor Height by clicking the small circle next to each.

![Camera keyframes](./images/camera-keyframes.jpg)

## Make transitions smoother

If you're lucky, the interpolation between your keyframes will already give you nice looking camera moves. Then you can just play with the timing by moving the keyframes around on the timeline.
Expand All @@ -52,6 +56,8 @@ Often though, the default interpolation will mean that your object goes outside
- Now repeat these steps for the end of the transition, adding a Track To constraint that has the target as a new empty that is aligned to the position of the camera at the end of the transition. Set a keyframe on Influence to be 0 at the start of the transition and 1 at the end.
- Now by playing around with where the influence of both switches from 0 to 1 and how fast, you can normally achieve a smooth camera move that always keeps the model in frame and gradually transitions from looking at the initial point on the model, to looking at the end point on the model.

![Track to constraints](./images/track-to.jpg)

- If neither of these work, then you will just have to manually keyframe the camera location/rotation until the transition looks good.

## Rendering it out
Expand Down

0 comments on commit f0ff65b

Please sign in to comment.