Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Computer Animation Algorithms and Techniques Physically Based Animation Rick Parent Computer Animation Physics Review: force, mass, acceleration velocity, position a f ma m a f /m v' v a t p' p (v v ' ) 1 t p vt at 2 2 2 f v’ vave v a Rick Parent Computer Animation Physics Review: Gravity Gm1m2 F d2 Gmearthm2 F 2 d earth radius F a 9 .8 m / s 2 m2 Rick Parent Computer Animation Physics Review: Other forces f st k st f N Static friction f k kk f N Kinetic friction f vis K vis nv K vis 6r Viscosity for small objects No turbulence For sphere Rick Parent Computer Animation Physics Review: Spring-damper F k s ( Lcurrent Lrest ) F k s ( Lcurrent Lrest ) k dVspring Hooke’s Law Rick Parent Computer Animation Physics Review: Momentum P mv conservation of momentum (mv) In a closed system, momentum is conserved P mv m'v' After collision has same momentum as before collision Rick Parent Computer Animation Elastic Collisions No energy lost (e.g. deformations, heat) mv m'v' d mv dP F ma dt dt Rick Parent Computer Animation Elastic Collisions & Kinetic Energy As in all collisions: momentum is conserved P mv m'v' In elastic collisions, kinetic energy is also conserved 1 2 1 P mv mv2 2 2 Solve for velocities Rick Parent Computer Animation Inelastic Collisions Kinetic energy is NOT conserved Rick Parent Computer Animation Inelastic Collisions Kinetic energy lost to deformation and heat Momentum is conserved Coefficient of restitution ratio of velocities before and after collision Rick Parent Computer Animation Center of Mass Cmass 1 M 1 r dm M Cmass Rick Parent (r )r dV (r )r dV (r )dV mi ri mi Computer Animation Physics Review Linear v. angular terms Linear postion velocity acceleration mass Force momentum Rick Parent Angular Rotation, orientation rotational (angular) velocity rotational (angular) acceleration Inertia tensor Torque Angular momentum Computer Animation Change in point due to rotation (t ) - Angular velocity (t ) (t ) On-axis or off axis rotation Angular velocity is the same p(t ) x(t ) r (t ) (t ) r (t ) x(t ) Rick Parent r(t ) (t ) r (t ) r(t ) (t ) r (t ) sin Computer Animation Delta-orientation due to rotation R(t ) R1 (t ) R2 (t ) R3 (t ) R (t ) (t ) R1 (t ) (t ) R2 (t ) (t ) R3 (t ) Ay Bz Az B y 0 A B Az Bx Ax Bz Az Ax B y Ay Bx Ay Az 0 Ax Ay Bx Ax B y A* B 0 Bz R (t ) (t )* R(t ) Rick Parent Computer Animation Change to a point on rotating object q(t ) R(t )q x(t ) R(t )q q(t ) x(t ) q (t ) (t ) x(t ) q (t ) (t )* R(t )q v(t ) q (t ) (t ) (q(t ) x(t )) v(t ) Rick Parent Computer Animation Physics Review: Angular Stuff f ma rF P mv L r p dP f dt Pi c dL dt Li c r F r p mv I Rick Parent Computer Animation Angular Momentum q (t ) (t ) x(t ) L(t ) ((q(t ) x(t )) mi (q (t ) v(t ))) ( R(t )q mi ( (t ) (q(t ) x(t )))) (mi ( R(t )q ( (t ) R(t )q))) Rick Parent Computer Animation Inertia Tensor I xx I I xy I xz Aka Angular mass I xx ( y z )dm 2 2 I yy ( x 2 z 2 )dm I zz ( x y )dm 2 Rick Parent 2 I xy I yy I yz I xz I yz I zz I xy xydm I xz xzdm I yz yzdm Computer Animation Inertia Tensor of particles I xx I I xy I xz Discrete version For particle collection I xy I yy I yz I xz I yz I zz I xx mi ( yi zi ) I xy mi xi yi I yy mi ( xi zi ) I xz mi xi zi I zz mi ( xi yi ) I yz mi yi zi 2 2 2 Rick Parent 2 2 2 Computer Animation Standard Inertia Tensors Symmetric wrt axes Cuboid I xx I 0 0 0 I yy 0 0 0 I zz M (b 2 c 2 ) 0 0 1 I 0 M (a 2 c 2 ) 0 12 2 2 0 0 M (a b ) 1 0 0 2 MR I 0 1 0 5 0 0 1 2 Sphere Rick Parent Computer Animation Inertia Tensor transformations I xx M (Y 2 Z 2 ) I xy MXY I xz MXZ I translated I xy MXY I yy M ( X 2 Z 2 ) I yz MYZ 2 2 I xz MXZ I MYZ I M ( X Y ) yz zz I rotated RI object R 1 Rick Parent Computer Animation x(t ) R (t ) S (t ) P (t ) L(t ) Object attributes M, Iobject-1 1 1 I rotated RI object R 1 P (t ) v (t ) M w(t ) I (t ) 1 L(t ) Rick Parent The Equations F r rF x(t ) v(t ) R(t ) w(t )* R(t ) d d S (t ) dt dt P(t ) F (t ) L ( t ) ( t ) If using rotation matrix, will need to orthonormalize updated rotation matrix Computer Animation Springs Flexible objects Cloth Virtual springs Proportional derivative controllers (PDCs) Rick Parent Computer Animation Spring-mass-damper system f Rick Parent -f Computer Animation Spring-mass system V3 E23 E31 Force Rick Parent V1 E12 V2 Computer Animation “Virtual” edge springs system Rick Parent Computer Animation Angular springs Linear spring between vertices Dihedral angular spring Rick Parent Computer Animation Spring mesh Each vertex is a point mass Each edge is a spring-damper Diagonal springs for rigidity Angular springs connect every other mass point Global forces: gravity, wind Rick Parent Computer Animation Virtual springs – soft constraints Rick Parent Computer Animation Proportional (Derivative) Controllers e.g., particle reacts to other forces while trying to maintain position on curve – virtual spring d x(t ) p(t ) F ks d Rick Parent F k s d kd vrelative Computer Animation Particle systems Lots of small particles - local rules of behavior Create ‘emergent’ element Particles: Do collide with the environment Do not collide with other partcles Do not cast shadows on other particles Might cast shadows on environment Do not reflect light - usually emit it Rick Parent Computer Animation Particle system Collides with environment but not other particles Particle’s midlife with modified color and shading Particle’s demise, based on constrained and randomized life span source Rick Parent Particle’s birth: constrained and time with initial color and shading (also randomized) Computer Animation Particle system implementation STEPS 1. for each particle 1. if dead, reallocate and assign new attributes 2. animate particle, modify attributes 2. render particles Use constrained randomization to keep control of the simulation while adding interest to the visuals Rick Parent Computer Animation