110 likes | 281 Views
Notes. Textbook on cameras: section 3.2 section 4.10 section 7.11 Assignment 1 out later today Implement a Hermite spline curve editor Export simple scene to RenderMan Assignment 2 will follow soon, extending system with kinematics (FK and IK). Camera Control.
E N D
Notes • Textbook on cameras:section 3.2section 4.10section 7.11 • Assignment 1 out later today • Implement a Hermite spline curve editor • Export simple scene to RenderMan • Assignment 2 will follow soon, extending system with kinematics (FK and IK) cs426-winter-2008
Camera Control • Three situations to think about: • CG film • Everything is synthetic, so control the camera however you want (artistic control or algorithms + artistic tweaking) • Video games • Fully automatic control, algorithm has to be smart enough to always be useful (or have user options to make it work) • Compositing vfx on real footage • Have to make sure CG camera matches the parameters and motion of real camera cs426-winter-2008
CG film camera • Simplest case: fix it once for shot • Too many moving shots are distracting anyhow… Alexander Nevsky vs. The Constant Gardener or Blair Witch or Cloverfield… • More generally: just more motion curves • But how to parameterize? • Can view camera as simply a 4x4 matrix transformation - but using a separate spline for each matrix entry is horrid cs426-winter-2008
Peeling off camera parameters • Essentially always want to separate out amount of perspective = field-of-view = lens diameter = … • Should only change for a specific cinematographic reason (zooms, etc.) • I.e. perspective projection is a separate part of the parameterization • Similarly depth-of-field and focal plane is usually fixed except for some cinematographic effects • Separate out skews (avoid them, except for a few cheesy effects) cs426-winter-2008
More peeling • Usually separate out selection of image plane • Scaling actually already handled by perspective, but no harm allowing redundant control • Normally image is centred • For some architectural shots, can keep vertical lines vertical… • Zooms • Left with specifying position and orientation of camera cs426-winter-2008
Possible parameterizations • Could just do motion curves for position (x,y,z) and Euler angles (heading, pitch, roll) • Intensely annoying to keep an object of interest in centre of view • Could instead do LOOKFROM (x,y,z) LOOKAT (x,y,z) and VUP (x,y,z) • Position is at LOOKFROM • Camera z-direction is parallel toLOOKAT - LOOKFROM • Camera x-direction is VUP CAMZ (careful!) • Camera y-direction is CAMZ CAMX • Usually VUP is (0,1,0) but can control roll by moving it around --- or a separate roll angle cs426-winter-2008
Special Cases • Circling around target • Parameterize target position (x,y,z), distance from target, and angles (heading, pitch, roll) • Very useful for interactive modeling also • Over the shoulder • Following path of object • All of these especially useful for video games cs426-winter-2008
Over the shoulder • Glue the camera to the object’s position motion curve or a displacement from it • Either use object’s orientation for camera • Or get CAMZ from motion curve tangent and use VUP to define CAMX, CAMY • Maybe additional roll angle for feeling of inertia or G-forces cs426-winter-2008
Path-following camera • Simplest approach: reuse object trajectory for camera - just lag • Camera position t frames behind object • Doesn’t handle acceleration/deceleration well! • Camera position distance d behind object • Need to do arc-length parameterization • But could be too jerky for comfort • Need to smooth out trajectory • Replace control points with weighted averages • Use B-splines! cs426-winter-2008
Path-following camera orientation • CAMZ should be pointing forwards along trajectory • Simplest approach: use trajectory tangent (first derivative of curve) • But doesn’t really point at object • So use LOOKAT/VUP approach • Again, additional roll angle useful for controlling feeling of inertia, G-forces cs426-winter-2008
Match move • Hardest case is matching CG camera to real film footage • Even for a fixed shot, still need to rough out scene in CG… • Smart cameras (measuring angles in joints, following preprogrammed motions) still not accurate enough, or not applicable • Instead take a vision-based approach:figure out the camera from the footage itself(or possibly augmented footage…) • Enter the “match move artist” cs426-winter-2008