Download presentation
Presentation is loading. Please wait.
Published byTeresa Watts Modified over 9 years ago
1
COMP 175 | COMPUTER GRAPHICS Remco Chang1/3608 – Animation Lecture 08: Animation COMP 175: Computer Graphics March 10, 2015
2
COMP 175 | COMPUTER GRAPHICS Remco Chang2/3608 – Animation Physics (dynamics, simulation, mechanics) Particles Rigid bodies (collisions, contact, etc.) Articulated bodies (constraints, robotics) Deformable bodies (fracture, cloth, elastic materials) Natural phenomenon (fluid, water, fire, etc.) Character dynamics (motion, skin, muscle, hair, etc.) Character Animation Motion capture Motion synthesis (locomotion, IK, procedural motion, retargeting) Motion playback Artificial Intelligence Behavioral animation Simulation of crowds (flocks, herds, crowds) Video game agents Camera control Topics in Animation
3
COMP 175 | COMPUTER GRAPHICS Remco Chang3/3608 – Animation Traditionally used in cel animation Animator specifies the positions and orientations at various key points In between frames are then interpolated. This used to be done by hand Now this is mostly done by computers John Lasseter, SIGGRAPH 87, “Principles of Traditional Animation Applied to 3D Computer Graphics” Key Framing
4
COMP 175 | COMPUTER GRAPHICS Remco Chang4/3608 – Animation Splines are typically used to interpolate the positions of objects Interpolating Key Frames
5
COMP 175 | COMPUTER GRAPHICS Remco Chang5/3608 – Animation The easiest spline to use is the cubic spline. As the name suggests, cubic means an equation with a power of 3, which also means that we need 4 numbers to define the equation E.g., for a linear curve, y = ax + b, there are two unknowns (a and b), so we need two sets of equations. For quadratic function, y = ax^2 + bx + c, we will need three sets of equations, etc. With key framing, how do we get a “smooth” curve between any two points? Splines
6
COMP 175 | COMPUTER GRAPHICS Remco Chang6/3608 – Animation Cubic Splines General form of a cubic spline: q(t) = a + bt * ct^2 + dt^3 q’(t) = b + 2ct + 3dt^2 Given: q(0) = S (starting point) q’(0) = Vs (velocity at point S) q(1) = G (goal point) q’(1) = Vg (velocity at end point G)
7
COMP 175 | COMPUTER GRAPHICS Remco Chang7/3608 – Animation Cubic Spline Plug in the numbers: q(0) = a + b(0) + c(0) + d(0) = S => a = S q’(0) = b + 2c(0) + 3d(0) = Vs => b = Vs Two remaining variables (c, d), two equations. Solve for c and d: q(1) = a + b(1) + c(1) + d(1) = G q’(1) = b + 2c + 3d = Vg
8
COMP 175 | COMPUTER GRAPHICS Remco Chang8/3608 – Animation Cubic Spline Plug in a = S, and b = Vs q(1) = S + Vs + c + d = G ---- (eq1) q’(1) = Vs + 2c + 3d = Vg ---- (eq2) Solve for c first, (eq1)*3 – (eq2) => c = -3S + 3G – 2Vs – 2Vg Solve for d, (eq2) – ((eq1) * 2) => d = 2S – 2G + Vs + Vg
9
COMP 175 | COMPUTER GRAPHICS Remco Chang9/3608 – Animation Cubic Spline Putting it all together: q(t) = ( 1S + 0G + 0Vs + 0Vg) + ( 0S + 0G + 1Vs + 0Vg) * t + (-3S + 3G - 2Vs - 1Vg) * t * t + ( 2S - 2G + 1Vs + 1Vg) * t * t * t Test this by plugging in t = 0 and t = 1
10
COMP 175 | COMPUTER GRAPHICS Remco Chang10/3608 – Animation Note that the above equation solves for the cubic spline in one dimension, but you can generalize it to 3D. This is because that since x, y, and z or orthogonal, we can compute the forces to x, y, and z independently. Splines in 3D
11
COMP 175 | COMPUTER GRAPHICS Remco Chang11/3608 – Animation Animators in the past didn’t have access to computers, so they had to “simulate” what our eyes see when perceiving motion. These are known as stretch and squash Generalized Motion
12
COMP 175 | COMPUTER GRAPHICS Remco Chang12/3608 – Animation Cartoon Physics
13
COMP 175 | COMPUTER GRAPHICS Remco Chang13/3608 – Animation Generating key frames continues to be an important question for animator because different effects require different techniques How to Obtain the Key Frames?
14
COMP 175 | COMPUTER GRAPHICS Remco Chang14/3608 – Animation Skeletons and Skinning Skeletons: a collection of bones (rigid bodies) and joints Skinning: associating each point of the mesh to an affine combination of bone/joint locations Real-time deformation by applying skinning weights to deformed skeleton Key Framing in Character Animation
15
COMP 175 | COMPUTER GRAPHICS Remco Chang15/3608 – Animation Popular in movies / games and supported by a wide range of software such as Maya, 3D Max. Skeletal Animation
16
COMP 175 | COMPUTER GRAPHICS Remco Chang16/3608 – Animation Forward Kinematics: “Given a set of joint angles, what is the x,y,z position of my hand?” Inverse Kinematics: “Given the position of my hand, what is the pose (joint angles) of my character?” Note that the solution might not be unique Kinematics
17
COMP 175 | COMPUTER GRAPHICS Remco Chang17/3608 – Animation In a simple case: that is, 2D, two links, 1 fixed joint (can rotate by can’t move), and 1 regular joint We can solve for theta_knee using cos -1 because we know the length of link1 and link2. Given theta_knee, we can find beta Simple IK
18
COMP 175 | COMPUTER GRAPHICS Remco Chang18/3608 – Animation In more complex cases that involves multiple (hierarchical) joints, the problem is much more difficult. Again, this is partially because the solution space could be empty, or it could be large (i.e., solutions are not unique) The common solution is to use an iterative approximation algorithm (such as gradient descent, simulated annealing, etc.) Complex IK
19
COMP 175 | COMPUTER GRAPHICS Remco Chang19/3608 – Animation The general idea behind gradient descend method is based on the assumption that: Given a function f, you can quickly compute f(x) in g However, it is not easy to directly compute g(x) In addition, there’s an “error function” that tells you how “wrong” you are (and sometimes in what directionality the error is – that is, the gradient) So, gradient descent becomes iterative in that: The algorithm takes a random guess on x Given the error feedback, compute a delta_x Then compute f(x + delta_x) And so on A Quick Reference to Gradient Descend
20
COMP 175 | COMPUTER GRAPHICS Remco Chang20/3608 – Animation Given an articulated figure, there are often constraints to the joints (e.g., how far they can bend) The iterative approach can integrate these constraints when looking for the solution x Inverse Kinematics
21
COMP 175 | COMPUTER GRAPHICS Remco Chang21/3608 – Animation Different technologies, but roughly categorized into two groups: Passive: passive systems are usually camera based. This means that an actor would wear reflective markers on a body suit, and cameras would capture and compute depth information. The benefits are that it’s easy to set up; can scale up to multiple actors; can be used on anything (such as faces or non- human actors). Downsides are: noise, occlusion, cost (in hardware and software), fixed environment (in the lab) Active: active systems do direct measurements of the joint angles. These include skeletal suits or flexors to measure forces. The benefits are almost exactly the opposite of the passive systems Motion Capture
22
COMP 175 | COMPUTER GRAPHICS Remco Chang22/3608 – Animation Passive Systems
23
COMP 175 | COMPUTER GRAPHICS Remco Chang23/3608 – Animation Active Systems
24
COMP 175 | COMPUTER GRAPHICS Remco Chang24/3608 – Animation “Practical Motion Capture in Everyday Surroundings” by Vlasic et al., SIGGRAPH 07 Hybrid
25
COMP 175 | COMPUTER GRAPHICS Remco Chang25/3608 – Animation Motion capture labs are still largely very expensive to set up (depth cameras could cost hundreds of thousands) One approach to cut down the cost is to capture “snippets” of motions. For example, for a walk cycle, a gesture, etc. Given a sufficiently large motion library, one can generate a plausible motion graph by stitching these motion snippets together The “easy” challenge is in blending the motions to hide the seams The “hard” challenge is to model intent Motion Graphs
26
COMP 175 | COMPUTER GRAPHICS Remco Chang26/3608 – Animation How would you blend motions? Motion Graph
27
COMP 175 | COMPUTER GRAPHICS Remco Chang27/3608 – Animation The idea of motion map sounds great, but there are still some big issues: Motion captured data only works on a 3D model of the exact same (real) person. For example, think about how an infant (toddler, and troll) walks differently because of differences in body part proportions (http://research.cs.wisc.edu/graphics/Gallery/Retarget/final_ render.htm) And can we apply walking motion to, say, the Pixar Lamp? (Semantic Deformation Transfer -- http://www.mit.edu/~ibaran/sdt/) Motion Retargeting
28
COMP 175 | COMPUTER GRAPHICS Remco Chang28/3608 – Animation In addition to the retargeting issue, there is also the problem of “coverage”. Namely, what happens if there is a missing chunk of animation that you need but it isn’t in the library/database? http://www.cs.cmu.edu/~aw/pdf/spacetime.pdf http://www.cs.cmu.edu/~aw/pdf/spacetime.pdf http://www.cs.cmu.edu/~aw/mpg/luxo.mpg http://graphics.cs.cmu.edu/nsp/papers/sig97.pdf http://graphics.cs.cmu.edu/nsp/projects/spaceti me/spacetime.html Motion Synthesis
29
COMP 175 | COMPUTER GRAPHICS Remco Chang29/3608 – Animation “Plausible Motion Simulation for Computer Graphics Animation”, Barzel et al., SIGGRAPH 96 http://www.ronenbarzel.org/papers/plausible/ http://www.ronenbarzel.org/papers/plausible/ “Perceptual Metrics for Character Animation”, Reitsma et all, SIGGRAPH 02 http://graphics.cs.cmu.edu/nsp/projects/perception/pe rception.html Perception of Motion
30
COMP 175 | COMPUTER GRAPHICS Remco Chang30/3608 – Animation Generalized Motion
31
COMP 175 | COMPUTER GRAPHICS Remco Chang31/3608 – Animation This is kind of a fancy way of saying f = ma, but still has the problem of needing to work with the linear forces and the rotational forces (torque) separately. Thankfully, we can put the two together in one package in matrix form. Generalized Motion
32
COMP 175 | COMPUTER GRAPHICS Remco Chang32/3608 – Animation Generalized Forces
33
COMP 175 | COMPUTER GRAPHICS Remco Chang33/3608 – Animation Going back to the Generalized Form
34
COMP 175 | COMPUTER GRAPHICS Remco Chang34/3608 – Animation Example
35
COMP 175 | COMPUTER GRAPHICS Remco Chang35/3608 – Animation Rigid Bodies Fast collision detection Transference of forces Fast computation for large number of objects Deformable Bodies Natural phenomenon http://physbam.stan ford.edu/~fedkiw/ http://www.youtub e.com/watch?v=nJW z0PaMlkI Physically Based Simulation
36
COMP 175 | COMPUTER GRAPHICS Remco Chang36/3608 – Animation Remco’s Master’s thesis… Last Word
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.