Stanford University, 2020 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 3:00PM - 4:20PM    (01/06/2019 - 03/13/2019) 
Office Hours (Prof)

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

Xinru (Lucy) Hua (CS PhD student, huaxinru@stanford.edu)
Office hours:
  •  Mon 3:30-5:30pm
  •  Fri 3-4pm
  •  In Gates 3B open space
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/winter2020/cs348c
Calendar

Google Calendar Link
Canvas

https://canvas.stanford.edu/courses/111557
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.5 week, 15%, or ]
  5. Particle-based Fluids [1.5 weeks, 15%, or ]
  6. Final Project (student choice) [3 weeks, 30%, or ]



Student Results (CS348C 2020 Winter)


HW1: Hello Houdini

HW2: Procedural Modeling

HW3: Collision Processing

HW4: Character FX

HW5: Particle-based Fluids







Student Results (CS348C 2019 Winter)


HW1: Hello Houdini

HW2: Procedural Modeling


HW3: Collision Processing (Spaghetti Factory)


HW4: Character Animation FX


HW5: Fluids


Final Projects




SCHEDULE:  (TENTATIVE)

DATE
TOPIC
SUPPLEMENTAL MATERIALS
TuJan07
Introduction
Slides:

Homework Activities:

Due WeJan15
Homework #1: Hello Houdini


Assignment Link


Video Highlights
ThJan09
Introduction to Houdini

Material:

TuJan14
Procedural Modeling

Material:
Due WeJan22
Homework #2: Procedural Modeling


 
Assignment Link

Image Credit: "Planet Alpha," Adrian Lazar

ThJan16
Particle Systems


Weekly: "Hello Houdini"

Whiteboard notes
on Piazza (Resources)

Material:

  • Particle system dynamics (read Witkin course notes, slides)
    • Implement "particles in a box" using a Houdini SOP Solver.
  • Energy-based modeling of forces
  • Numerical integration

References:


TuJan21
ThJan23
TuJan28
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
WeFeb05
Homework #3:
Robust Collision Processing

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


Assignment Link

Starter Code is available on Canvas.

Submit a png image of your best spaghetti factory run here.
TuJan28
ThJan30
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:
TuFeb04
ThFeb06
Rigid-Body Motion

References:

Due
SaFeb15
Homework #4:
Character Animation FX



 Assignment Link

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



Material:
TuFeb18
ThFeb20
TuFeb25

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
WeFeb26
Homework #5:
Position Based Fluids in Houdini

Fluid Animation [, 1.5 weeks, 20%, or ]

Assignment Link

Submit your video artifact for weeklies using this Dropbox File Request (W20)

TuFeb25
Application of Rigid-Body Motion:
Shape Matching Methods



Discussed:
  • General ideas: 
    • Projecting particle motion to be rigid motion
    • Deformation gradient & Polar decomposition
  • 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]
ThFeb27
Kelvinlets


Material:
TuMar03
Yarn-level Cloth

Material:
ThMar05
Animation Sound



Material:
TuMar10
Working Class

  • Please work remotely on your projects
  • Prof. James will be available online (Zoom link in Piazza)
ThMar12
Project Presentations
  • Due to covid, presentations will be done remotely using Zoom
  • Please see instructions on Piazza


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

Assignment #1:
Position-Based Fluids



Implicit Integration
& Cloth Simulation

Material:

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




Material: 

Lightning, Ice Growth, and Diffusion Limited Aggregation (DLA)


Material:
 
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:


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)




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