Stanford University, 2019 Winter
CS 348C: Computer Graphics: Animation and Simulation

Instructor:
Prof. Doug James





Description: Core mathematics and methods for computer animation and motion simulation. Traditional animation techniques. Physics-based simulation methods for modeling shape and motion: particle systems, constraints, rigid bodies, deformable models, collisions and contact, fluids, and fracture. Animating natural phenomena. Methods for animating virtual characters and crowds. Additional topics selected from data-driven animation methods, realism and perception, animation systems, motion control, real-time and interactive methods, and multi-sensory feedback.


Location
    
Wallenberg Hall (160-124)    
Time

TuTh 1:30PM - 2:50PM    (01/07/2019 - 03/15/2019) 
Office Hours (Prof)

Wed 4:00-6:00 PM (Gates 362), or by appointment
TA

Paul Liu (CS PhD student)
Office hours:
  • Mon 2:50-3:50pm in Gates B26
  • Thu 2:50-4:50pm in Gates B30
Prerequisites

Recommended: CS148 and/or CS205A. Prerequisite: linear algebra. (or permission of instructor)
Textbook

None; lecture notes and research papers assigned as readings will be posted here.
Communication

Piazza: https://piazza.com/stanford/winter2019/cs348c
Calendar

Google Calendar Link
Requirements

Students are expected to attend lectures, participate in class discussions and working sessions, and read the supplemental materials.
Assignments

There will be programming assignments, and a final project based on a student-selected topic.
Late Policy

We allow 3 late days, with 10%/day deduction thereafter.
Exams

None
ExploreCourses

Link


ASSIGNMENTS
  1. Hello Houdini [1 week, 10%, ]
  2. Procedural Modeling [1 week, 10%, ]
  3. Robust Collision Processing [2 weeks, 20%, or ]
  4. Character Animation FX [1 week, 10%, or ]
  5. Fluids [2 weeks, 20%, or ]
    Student choice between:
    1. Position Based Fluids (SPH) solver, or
    2. Affine Particle-in-Cell (APIC) solver, or
    3. Nontrivial animation in Houdini (special permission only).
  6. Final Project (student choice) [3 weeks, 30%, or ]


SCHEDULE:

DATE
TOPIC
SUPPLEMENTAL MATERIALS
TuJan08
Introduction
Slides:

Homework Activities:

Due WeJan16
Homework #1: Hello Houdini


Assignment Link


Video Highlights
ThJan10
Introduction to Houdini

Material:

TuJan15
Procedural Modeling

Material:
Due WeJan23
Homework #2: Procedural Modeling


 
Assignment Link

Image Credit: "Planet Alpha," Adrian Lazar

ThJan17
Particle Systems


Weekly: "Hello Houdini"

Whiteboard notes
on Piazza (Resources)

Material:

  • Particle system dynamics -- read Witkin course notes
  • Energy-based modeling of forces
  • Numerical integration

References:


TuJan22
ThJan24
TuJan29
Robust Collision Processing


Weekly (Thurs24): Procedural Modeling

Whiteboard notes on Piazza (Resources)

Material:

  • Collision detection basics (broad/narrow phases)
  • Velocity-level collision resolution
  • Continuous collision detection
    • 2D (point-edge, sphere-sphere), and 3D (point-face, edge-edge) tests
  • Impulse resolution; restitution coefficient
  • Supporting pin/trajectory constraints
    • Inverse-mass-matrix filtering
  • Penalty forces
  • Rigid cloth zones
References:
Due
WeFeb06
Homework #3:
Robust Collision Processing

(a.k.a. "The Spaghetti Factory")

Starter Code is available on Canvas.

Submit a png image of your best spaghetti factory run here.
TuJan29
ThJan31
Constrained Dynamics




Material:
  • Holonomic constraints, C(p)=0.
  • Example: Bead on a wire
  • Differentiating constraints w.r.t. time.
  • Constraint Jacobian, J
  • Lagrange multipliers, lambda, and constraint forces, J^T lambda
  • Solving for Lagrange multipliers
  • (Implicit constraint (and half-explicit) DAE integration schemes)
  • Post-step projection schemes
    • Position- vs velocity-based corrections
  • Applications: Mechanical linkages, inextensibility constraints, incompressible flow, contact constraints
References:
[Advanced] References for Differential-Algebraic Equations (DAEs):

Taking Derivatives:
From Tensor Calculus, to Symbolic and Automatic Differentiation

Material: Differentiating the following quantities with respect to particle position vectors, p_i:
  • constant, c
  • position, p_j
  • vectors, (p_j-p_k)
  • distances, ||p_j-p_k||
  • distance powers, ||p_j-p_k||^n
  • functions of distance, W(||p_j-p_k||)
  • dot products, (p_1-p_0)^T (p_3-p_2)
  • cross products
  • Example: hair bending energy derivative, E = k*sin^2(theta/2)  [handout] [Mathematica]
Other topics:
Reference:
TuFeb05
Rigid-Body Motion

References:

Due
WeFeb13
Homework #4:
Character Animation FX



 
Submit your video artifact for weeklies using this Dropbox File Request.
 
 Full artifact/code/hipnc submission on Canvas.
Due
WeFeb20
Final Project Proposal
ThFeb07
TuFeb12
Particle-based Fluids



Material:
TuFeb12
ThFeb14
TuFeb19
ThFeb21

Fluid Animation

Topics:
  • Navier-Stokes equations; Euler equations for inviscid fluids
  • Advection; semi-Lagrangian methods
  • Splitting schemes
  • Incompressibility constraint & divergence-free flow
  • Helmholtz-Hodge decompositions; pressure projection
  • PIC/FLIP methods [Zhu & Bridson 2005]
  • APIC method [Jiang et al. 2015]
Material:
Due
WeFeb27
Homework #5:
Fluid Animation

Fluid Animation [2 weeks, 20%, or ]
Student choice between:
  1. Position Based Fluids (SPH) solver, or
  2. Affine Particle-in-Cell (APIC) solver, or
  3. Nontrivial animation in Houdini (special permission only).

Submit your video artifact for weeklies using this Dropbox File Request

TuFeb26
Material Point Method (MPM), and Snow Simulation


Discussed:
  • Material Point Method (MPM) overview
  • Application to snow simulation
  • Deformation gradient
  • Elastic strain energy, forces, and gradients
  • Multiplicative plasticity methodology; application to snow
  • Grid force and gradient calculations
  • Semi-implicit integration of velocities
  • Deformation gradient update
  • Grid and particle collision handling
  • Slides [PDF] (courtesy Craig Schroeder & Joseph Teran) in Piazza Resources
  • Practical tips for making a minimum viable snow simulator

Material:

ThFeb28
Rigid-body Contact:
Impulse- and Contraint-based Methods:




Material: 
TuMar05
Lightning, Ice Growth, and Diffusion Limited Aggregation (DLA)



Material:
ThMar07
Animation Sound



Material:
TuMar12
Guest Speaker: Ted Kim (Pixar)

Guest Speaker:
Theodore Kim
Senior Research Scientist
Pixar Animation Studios

Talk Information:
Research and Collaboration in Incredibles 2 and Bao
Abstract: In this talk, I will describe two successful collaborations that took place between research, development, and production during the making of the motion picture Incredibles 2, as well as the short film that preceded it, Bao. For Incredibles 2, we developed a robust new algorithm for skin simulation that was used during a key fight scene between the baby Jak-Jak and a raccoon. For Bao, our colleagues in production leveraged a robust new volume simulation technique that research had recently developed in order to deal with challenging cloth simulation scenarios.
BONUS:
  • Lunch w/ Ted (noon-1pm, Gates 304): We will be organizing a student lunch with Ted if you are interested in meeting him, and hearing about life and research at Pixar.
ThMar14
Project Presentations



Related prior course offerings:
Other material:
DATE TOPIC SUPPLEMENTAL MATERIALS

Prog. Assignment #1:
Position-Based Fluids



Implicit Integration
& Cloth Simulation

Material:
 
Application of Rigid-Body Motion:
Shape Matching Methods



Discussed:
  • Projecting particle motion to be rigid motion
  • Rigid-body shape matching
  • Fast Lattice Shape Matching (FastLSM)
  • Other methods (adaptive FastLSM; oriented particles)
Material:
  • Matthias Müller, Bruno Heidelberger, Matthias Teschner, Markus Gross, Meshless deformations based on shape matching, ACM Transactions on Graphics, 24(3), August 2005, pp. 471-478. [ACM] [PDF] [AVI]
  • Alec R. Rivers, Doug L. James, FastLSM: Fast Lattice Shape Matching for Robust Real-Time Deformation, ACM Transactions on Graphics, 26(3), July 2007, pp. 82:1-82:6. [ACM] [PDF]
  • Denis Steinemann, Miguel A. Otaduy, Markus Gross, Fast Adaptive Shape Matching Deformations, ACM SIGGRAPH/Eurographics Symposium on Computer Animation, Dublin, July 7-9, 2008. [PDF] [AVI]
  • Matthias Müller and Nuttapong Chentanez. Solid simulation with oriented particles. ACM Trans. Graph. 30, 4, Article 92 (July 2011), 10 pages, 2011. [ACM] [PDF] [MOVIE]


Position-Based Simulation Methods                                                     
and other relaxation-based dynamics
 
References:
  • Jan. Bender, Matthias. Müller, Miles. Macklin, Position-Based Simulation Methods in Computer Graphics, EUROGRAPHICS Tutorial Notes, 2015, Zürich, May 4-8. (Course Notes)(Slides)
  • M. Müller, B. Heidelberger, M. Hennix, J. Ratcliff, Position Based Dynamics, Proceedings of Virtual Reality Interactions and Physical Simulations (VRIPhys), pp 71-80, Madrid, November 6-7 2006, Best Paper Award, PDF, (video), (slides)
    • Miles Macklin, Matthias Müller, Nuttapong Chentanez: XPBD: Position-Based Simulation of Compliant Constrained Dynamics in Proceedings of ACM Motion in Games, San Francisco, October 2016
      [PDF][Slides][Video][Youtube] (An improved PBD approach)
Other Reading:

Prog. Assignment #2:
Position-Based Dynamics



Fracture Animation

Material:


Guest Speaker

Guest Speaker:

Material:

Power Particles: An incompressible fluid solver based on power diagrams
de Goes, Wallez, Huang, Pavlov, Desbrun
SIGGRAPH / ACM Transactions on Graphics (2015)
preprint video I video II dl.acm


Assignment #2: Constrained Dynamics
  • Starter Code: Use your code from Assignment #1.
  • Relevant 2016 written assignment on inextensibility constraints (handout, solution)

Final-Project Working Class

  • Come to class prepared to discuss & work on your final project
  • Bring questions

Noise & Turbulence Modeling
from [Kim et al. 2008]
Materials: