Somewhat Realistic Camera Shake Tracks ====================================== See camerashake.h and camerashake.cpp in libshakez/ subdirectory. They are the only code you need to use. The rest of this readme and other scripts are here only for completeness. Conversion script ----------------- The conversion script takes in numpy arrays and outputs looped and cross-faded binary arrays. It basically centers frame poses and then calls theta = scipy.linalg.orthogonal_procrustes(reference_pose, frame_pose) to get the roll vector theta. The script then linearly mixes in the last second of the recording into the first second, resulting in a crossfade. To run it: pip install -r requirements.txt convert_everything.bat Data ---- I generated the input files in data/ by tracking three points using Blender's motion tracker feature and saved them to a numpy array with this script: import bpy import pickle import numpy as np clip=bpy.data.movieclips['20210308_133421.mp4'] WIDTH = 1920 HEIGHT = 1080 track_points = [] for ti, track in enumerate(clip.tracking.tracks): print(f"[{ti}] Track {track.name}") if track.hide: print(f"Skipping hidden track {ti}") continue points = [] for i, marker in enumerate(track.markers): frame = marker.frame co = marker.co nx, ny = co pix = [WIDTH * nx, HEIGHT * (1-ny)] # normalized [0,1] UVs to pixel coordinates points.append(pix) print(f"[{ti}][{i}] marker @ {frame} is {co}. Pixels {pix}") track_points.append(points) arr = np.array(track_points) np.save(r"fastwalk.npy", arr, allow_pickle=False) It would've been nice to all this inside Blender but it couldn't export 2D camera poses. History ------- 2021-07-14 v5: GLSL version with a texture map added. Crossfade fixed and removed DC bias. 2021-07-13 v4: Broken CSV files fixed. 2021-07-12 Hotfix release that correctly computes pose->right vector. 2021-07-12 First release.