1 / 45

Computer Graphics Animation Techniques

Computer Graphics Animation Techniques. Ronen Barzel. Introduction Keyframe interpolation. About me. Pixar animation studios “Toy Story”: modeling, lighting, software Tools development Research Physically-based modeling Non-photorealistic rendering ronen@barzel.org. Outline for today.

zonta
Download Presentation

Computer Graphics Animation Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer GraphicsAnimation Techniques Ronen Barzel Introduction Keyframe interpolation

  2. About me • Pixar animation studios • “Toy Story”: modeling, lighting, software • Tools development • Research • Physically-based modeling • Non-photorealistic rendering • ronen@barzel.org

  3. Outline for today • Overview of the course • Overview of CG animation process • Keyframe animation

  4. Outline for today • Overview of the course • Overview of CG animation process • Keyframe animation

  5. Goals of the class • Exposure to common techniques • Motivation and principles • Implementation of basic methods • Tools, not art • Mechanism, not user interface

  6. Overview of the course • 9 class sessions: • ~1.5 hours lecture • ~2 hours TD • Projects • Large project (?) • Small project (?) • Final examination (?)

  7. Types of Animation • Scripted Animation • Procedural Animation • Motion capture

  8. Scripted Animation

  9. Procedural animation

  10. Motion capture

  11. Topics in Animation • Scripted Animation • Keyframe interpolation, articulated models, inverse kinematics, deformations, … • Procedural Animation • Particle Systems, Flocks, Crowds, Cloth, Fire, Smoke, Water, … • Motion capture • Filtering, editing, retargeting, stitching,… (more than 9 topics!)

  12. About you • Why are you taking the class? • What’s your background? • What are you interested in learning?

  13. Outline for today • Overview of the class • Overview of CG animation process • Keyframe animation

  14. Overview of CG animation • Story

  15. Overview of CG animation • Art

  16. Overview of CG animation • Recording

  17. Overview of CG animation • Modeling

  18. Overview of CG animation • Layout

  19. Overview of CG animation • Animation

  20. Overview of CG animation • Shading

  21. Overview of CG animation • Lighting

  22. Overview of CG animation • Rendering

  23. Why CG animation? • One medium of many: • live action, classical animation, clay, puppets, … • 3D has aspects of live film • Camera, cinematography • CG has aspects of classical animation: • Stylization, fantasy, scripted motion, … • Accessible • Computer editing. • Don’t need to act, don’t need to draw. • Need to understand acting, need to understand images

  24. Story, Animation most important • Modeling, rendering can’t save bad story • Modeling, rendering can’t save bad acting • Great story, acting are all you need: • Simpsons, South Park • “Europe and Italy” • “Yes and No” [play]

  25. Class projects: 2D • 3D fully rendered is more work • 2D simple shapes easier to do during class TD time • CG techniques are (mostly) the same

  26. Outline for today • Overview of the class • Overview of CG animation process • Keyframe animation

  27. Keyframe animation: classical • Animator draws character at “extreme” poses • Fill in in-betweens • Textbook “Illusion of Life”

  28. Keyframe animation: CG • Model parameters • Position (x,y,z), joint angles, deformations, … • Key frames = data points • In-between = interpolation • Many ways to interpolate: • linear • splines (polynomial curves)

  29. Linear interpolation • Given points P0 and P1, define curve L(t): L(t) = (1-t) P0 + t P1 t in [0,1] • Weighted average of endpoints. • “Curve” is linear segment

  30. Linear interpolation: N points • Given P0…PN, define segment: Li(s) = (1-s) Pi + s Pi+1 s in [0,1] • Then define piecewise-linear curve: L(t) = Li(s) for ti< t < ti+1 Where s = (t-ti)/(ti+1-ti) and (let’s say) ti = i/N

  31. Spline curves • To make smooth curves from data points • Many types of splines, many properties: • Interpolating, approximating, … • Build an order-k polynomial from k+1 points

  32. Spline curve segment • General form for a segment: C(t) = B0(t)P0 + …+ Bk(t)Pk • Weighted average of k control points • Basis functions Bi(t), order-k polynomials • Many choices, many properties • Most commonly: k=3 (cubic) • We’ll use the cubic Bézier curve

  33. k i Bézier spline segment • Pierre Bézier, 1972 (obituary 1999) • Basis functions are Bernstein Polynomials: Bik(t) = ti(1-t)k-i • For k=3: B0 = (1-t)3 B1 = 3t(1-t)2 B2 = 3t2(1-t) B3 = t3

  34. Bézier spline segment • Properties: • Interpolates endpoints • Intermediate points control shape • Easy to use • Applets: • Someone at UCLA • Someone from blueyonder

  35. Bézier curve: N points • Given P0…PN, define K=(N-1)/3 segments: Ci(s) = B0(s)P3i+B1(s)P3i+1+B2(s)P3i+2+B3(s)P3i+3 • Then define piecewise-cubic curve: C(t) = Ci(s) for ti< t < ti+1 Where s = (t-ti)/(ti+1-ti) and (let’s say) ti = i/K

  36. Bézier curve: N points • Segments connect at endpoints • C0 continuous • Can be C1 continuous, with constraints • Applet: • Someone at princeton

  37. Simple Animation • Use Bézier curve C(t) for character position. • Map frame (24 frames per second) to t: Position(f) = C((f-fstart)/(fend-fstart)) • See “TD1” demo • Notice trouble with speed

  38. Speed along the spline • Uniform parameterization: speed varies • Arc-length parameterization: constant speed • User-specified speed

  39. Arc-length parameterization • Really, reparameterization • Define S(t), length along curve until t ds2 = dx2 +dy2 S(t) = 0∫t ((dx/dt)2+(dy/dt)2)½ dt S(t) = 0∫t || dC(t)/dt|| dt • Reparameterize: Carc(s) = C(t(s)) where t(s) = S-1(s) • Need inverse function

  40. Arc-length reparameterization • Exact computation is too expensive & hard • Simple approximation: chord length • Sample M times (sufficiently large, e.g. M=10N) Si = Si-1 + || C(i/M) – C((i-1)/M) || • To invert: • Given s in [0,SM] find i such that Si < s < Si+1 t = (i + (s-Si)/(Si+1-Si)) / M • For normalized arc length, use s SM, s in [0,1] • See “TD1” demo

  41. User-specified speed • Assign times to knots • Ease-in, ease-out • Interesting questions re editing, UI… • Not going to get into this now…

  42. Animating Arbitrary Parameters • Previous discussion created a 2D (3D) curve as a function of t, used for position • We want to create 1D function of frame, used for any parameter (“avar”) • Want to interpolate key values • Want to control shape between values • Many possible splines… • We will use 2D Bezier curves!

  43. 2D Bézier curve for avar values • Curve is C(t) => (Cx(t), Cy(t)) • Use x = frame, y = value • UI: “knots” with “handles” • Cx(t) needs to be single-valued • UI: knots always in increasing X order

  44. 2D curve for avar values • Curve is C(t) => (Cx(t), Cy(t)) • To get value at frame f, reparameterize: Avar(f) = Cy(t(f)) where t(f) = Cx-1(f) • To find inverse: • Given f find t: Cx(t)=f • Standard form: Cx(t)-f=0: root finding • We’ll use binary searchto find t

  45. Root finding by binary search • Given function F(t) for t in [0,1], • want t such that F(t)=0 • assume t=0, t=1bracket a root • Algorithm: • start with tl=0, tr = 1 • compute tm= (tl + tr)/2 and F(tm) • if tl ,tmbracket a root trtm else tltm • repeat until tl≈ tr

More Related