Stanford University, 2024/25 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
    
Hybrid Format: In-person (Thornton 102), and virtual (live-streamed and recorded)

The 2024/25 Winter version of CS348C will be hybrid format using a mix of in-person and virtual activities. Please see Canvas for details. Lectures will be in-person and live-streamed, and recorded for offline viewing on Canvas/Panopto. Hybrid in-person/virtual participation is required for Show-&-Tell presentations.

Time

TuTh 4:30PM - 5:50PM    (01/07/2024 - 03/14/2024) 
Office Hours (Prof)

Wed 3-5pm (Zoom link in Canvas)
TAs

Zhehao Li (CS PhD student, zhehaoli@stanford.edu)

Kiyohiro (George) Nakayama (CS Masters student, w4756677@stanford.edu
)

Prerequisites

Recommended: CS148 or CS248B. Prerequisite: linear algebra (or permission of instructor)
Textbook

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

Ed (link on Canvas sidebar)
Canvas

https://canvas.stanford.edu/courses/199783 
Requirements

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

There will be self-directed 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 (2024/25) - Tentative
  1. Hello Houdini [1 week, 10%, ]
  2. Procedural Modeling [1 week, 10%, ]
  3. Dynamics [2 weeks, 20%, or ]
  4. Character & Audio FX [2 weeks, 20%, or ] -- Tentative
  5. Project Proposal [1 week, 10%, or ]
  6. Final Project [3 weeks, 30%, or ]


Student Results (CS348C 2024 Winter)


HW #1: Hello Houdini

HW #2: Procedural Modeling

HW #3: Dynamics

HW #4: Character & Audio FX

Final Project




Student Results (CS348C 2023 Winter)


HW #1: Hello Houdini

HW #2: Procedural Modeling

HW #3: Dynamics

HW #4: Character & Audio FX

Final Project




Student Results (CS348C 2022 Winter)


HW #1: Hello Houdini

HW #2: Procedural Modeling

HW #3: Dynamics

HW #4: Character FX

Final Project





SCHEDULE: (TENTATIVE -- WILL CHANGE)

DATE
TOPIC
SUPPLEMENTAL MATERIALS
TuJan07
Introduction
Slides:

Homework Activities:

  • Download and install SideFX Houdini Apprentice (registration required)
  • Start Houdini readings and tutorials in Homework #1
Due WeJan15

Homework #1: Hello Houdini


Assignment Link


Goal: Install Houdini Apprentice, create something simple, and submit a video or still.

Submit by Wednesday, Jan 15.
Show & Tell on Thursday, Jan 16.
ThJan09
Introduction to Houdini

Material:
  • Slides (PDF)
  • Houdini project file (hipnc)
  • Houdini learning curve (now with server ;)

TuJan14
ThJan16
TuJan21
ThJan23
Procedural Modeling

Material:
  • Slides (PDF)
  • Houdini project file (hipnc)
Due
WeJan22

Homework #2: Procedural Modeling


 
Assignment Link

Image Credit: "Planet Alpha," Adrian Lazar

TuJan28
Particle Systems

Material:
  • Slides (PDF)
  • Particle system dynamics (read Witkin course notes, slides)
  • Numerical integration
  • Particle collisions
  • Energy-based modeling of forces
  • Houdini example: particles.hipnc
    • Particles bouncing on a plane
    • Particles inside a convex domain
    • Particles inside an SDF domain
    • Particles attached to an SDF surface using damped springs <oh, my>

References:

  • David Baraff and Andrew Witkin, Physically Based Modeling, Online SIGGRAPH 2001 Course Notes, 2001.
    • Differential Equation Basics
    • Particle System Dynamics (slides)
    • Cloth and Fur Energy Functions (preview of energy function usage)
  • Videos:
Due
WeFeb05
Homework #3: Dynamics


Assignment Link

Image Credit: [Baraff and Witkin 1998] 
ThJan30
TuFeb04
Houdini Dynamics

Material:
  • Slides (PDF)
  • See video recording for live examples
TuFeb11
ThFeb13
Constrained Dynamics

Slides (PDF)

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
  • Houdini Example: Surface constraints
References:
[Advanced] References for Differential-Algebraic Equations (DAEs):

Homework #4: Character & Audio FX


Assignment Link

Submit your video artifact for weeklies
ThFeb13
TuFeb18
Position-Based Dynamics

Slides (PDF)

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; related to Houdini's Vellum implementation)
Other Reading:
Reference
Rigid-Body Motion
Slides/Notes (PDF)

References:

ThFeb20

Show & Tell: HW4 Char/Motion FX


TuFeb18
Final Project Discussion
Slides

Slide Deck on Ed
TuFeb25
Fracture Animation

Material:

ThFeb27
Final Project Proposals


Students pitch their final project ideas.
  • Google Slide deck link on Ed

Fluids I (Particles)


Material:

Fluids II (Grids)

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]

Slides

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 (courtesy Craig Schroeder & Joseph Teran)
  • Practical tips for making a minimum viable snow simulator

Material:


ThMar06
Guest Lecture: Ken Museth

Speaker: Ken Museth (https://research.nvidia.com/labs/prl/author/ken-museth)

Title: OpenVDB

Abstract:  As the inventor of VDB and founder of OpenVDB, I’m excited to talk about its history, motivation, adoption, and future. Specifically, this lecture will cover the underlying compact VDB data structure and various algorithms found in OpenVDB. Since its open-source release in 2012, OpenVDB has become an industry standard and has been used in numerous VFX franchises like “Avatar”, “Avengers”, “The Mummy”, “Pirates of the Caribbean”, “Kung Fu Panda”, and “How to Train Your Dragon”. It is also adopted by most commercial software packages used by the movie industry, including Houdini, RenderMan, Arnold, RealFlow, V-Ray, Octane Render, Embergen, Blender, KeyShot, LightWave, Siemens NX, Unreal Engine, as well as bindings for Mathematica. Recently, OpenVDB has also found use in new fields, including SLAM, autonomous driving, industrial design, 3D printing, medical imaging, rocket design, arial surveillance, robotics, and many machine learning applications. Finally, OpenVDB was the first open-source project to be adopted by the Academy Software Foundation (ASWF) and the Linux Foundation (in 2018).

TuMar11
ThMar13
Final Project Presentations

See Ed for instructions (slide deck, Canvas submission)

SUPPLEMENTAL MATERIAL (below here)




Discrete Elastic Rods
Reference:

Yarn-level Cloth

References:

Kelvinlets


Material:

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]

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




Material: 

Animation Sound



Material:


Student Results (CS348C 2021 Winter)


HW #1: Hello Houdini

HW #2: Procedural Modeling

HW #3: Dynamics

HW #4: Character FX

Final Project




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




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

Assignment #1:
Position-Based Fluids



Implicit Integration
& Cloth Simulation

Material:

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


Material:
 





Prog. Assignment #2:
Position-Based Dynamics







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: