Dynamical Simulation 1: Particle Systems and ODEs

Similar documents
Navier-Stokes & Flow Simulation

Navier-Stokes & Flow Simulation

Mass-Spring Systems. Last Time?

Computer Animation. Animation A broad Brush. Keyframing. Keyframing

Navier-Stokes & Flow Simulation

PHYSICALLY BASED ANIMATION

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

Topics in Computer Animation

Animation of Fluids. Animating Fluid is Hard

CGT 581 G Fluids. Overview. Some terms. Some terms

Particle-Based Fluid Simulation. CSE169: Computer Animation Steve Rotenberg UCSD, Spring 2016

Chapter 3: Computer Animation Reminder: Descriptive animation. Procedural animation : Examples. Towards methods that generate motion?

CS4621/5621 Fall Particle Systems and Compute Shaders

Announcements. Ray tracer is due in five days you should have started by now or you re going to have a bad week. Missing file posted on the web page

Fluids in Games. Jim Van Verth Insomniac Games

Particle Systems. Lecture 8 Taku Komura

Shape of Things to Come: Next-Gen Physics Deep Dive

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs)

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

NVIDIA. Interacting with Particle Simulation in Maya using CUDA & Maximus. Wil Braithwaite NVIDIA Applied Engineering Digital Film

Chapter 19- Object Physics

Simulation: Particle Systems

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

CS 354 R Game Technology

CS 231. Fluid simulation

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Chapter 14 Particle Systems & Interactions

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Introduction to Computer Graphics. Animation (2) May 26, 2016 Kenshi Takayama

Last Time? Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

CS 378: Computer Game Technology

CS-184: Computer Graphics Lecture #21: Fluid Simulation II

Dynamics in Maya. Gary Monheit Alias Wavefront PHYSICALLY BASED MODELING SH1 SIGGRAPH 97 COURSE NOTES

Simulation in Computer Graphics. Deformable Objects. Matthias Teschner. Computer Science Department University of Freiburg

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

Cloth Simulation. Tanja Munz. Master of Science Computer Animation and Visual Effects. CGI Techniques Report

More Animation Techniques

Particle Systems A Technique for Modeling a Class of Fuzzy Objects

A Geometric Approach to Animating Thin Surface Features in SPH Water

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

Rigid Body Dynamics, Collision Response, & Deformation

CNM 190, pt 2 Advanced Digital Animation Lec 03 : Art Direction on Madagascar / Effects 1

CUDA Particles. Simon Green

To Do. History of Computer Animation. These Lectures. 2D and 3D Animation. Computer Animation. Foundations of Computer Graphics (Spring 2010)

Animation and Ray Tracing

Divergence-Free Smoothed Particle Hydrodynamics

Smoke Simulation using Smoothed Particle Hydrodynamics (SPH) Shruti Jain MSc Computer Animation and Visual Eects Bournemouth University

Rendering diffuse objects using particle systems inside voxelized surface geometry. Thorsten Juckel Steffi Beckhaus

Physically Based Simulation

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Physically Based Simulation

Karen Liu associate professor at School of Interactive Computing. Murali Varma graduate student at School of Interactive Computing

Overview of Traditional Surface Tracking Methods

Real-Time Volumetric Smoke using D3D10. Sarah Tariq and Ignacio Llamas NVIDIA Developer Technology

Index FEATURES LIST 2

CS /15-667: Simulation Methods for Animation and Digital Fabrication

2.11 Particle Systems

Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 1. Prof Emmanuel Agu

Acknowledgements. Prof. Dan Negrut Prof. Darryl Thelen Prof. Michael Zinn. SBEL Colleagues: Hammad Mazar, Toby Heyn, Manoj Kumar

Particle-based Fluid Simulation

Rendering Smoke & Clouds

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/27/2017

Particle Systems. Sample Particle System. What is a particle system? Types of Particle Systems. Stateless Particle System

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Simulation in Computer Graphics. Introduction. Matthias Teschner. Computer Science Department University of Freiburg

Realistic Animation of Fluids

9 Dynamics. Getting Started with Maya 491

CUDA Particles. Simon Green

Water. Notes. Free surface. Boundary conditions. This week: extend our 3D flow solver to full 3D water We need to add two things:

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Interactive Fluid Simulation using Augmented Reality Interface

Simulation of Swirling Bubbly Water using Bubble Particles

Lagrangian methods and Smoothed Particle Hydrodynamics (SPH) Computation in Astrophysics Seminar (Spring 2006) L. J. Dursi

Computer animation for fluid simulation of a high viscous fluid melting

CMSC 425: Lecture 10 Skeletal Animation and Skinning

Structure and Synthesis of Robot Motion


Interactive Fluid Simulation Using Augmented Reality Interface

SIMULATION OF THE MIXING OF INK AND WATER IN HOUDINI

Index FEATURES LIST 2

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Animation of Water Droplet Flow on Structured Surfaces

A Fast and Stable Approach for Restoration of Warped Document Images

Physically based simulation of thin-shell objects burning

Constraint fluids in Sprinkle. Dennis Gustafsson Mediocre

BACHELOR OF ARTS IN 3D ANIMATION AND VISUAL EFFECTS Term-End Theory Examination December, 2015 BNM-001 : ANIMATION PRODUCTION PIPELINE

Post Mortem: GPU Accelerated Effects in Borderlands 2

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and

Lec 10 MEL for Dynamics

Demoscene and Maths. Presentation by Konstantinos Pataridis aka Navis/ASD University of Oxford August 2006

Real-time Breaking Waves for Shallow Water Simulations

Animation. Itinerary. What is Animation? What is Animation? Animation Methods. Modeling vs. Animation Computer Graphics Lecture 22

C O M P U T E R G R A P H I C S. Computer Animation. Guoying Zhao 1 / 66

RENDERING WATER AND LAND INTERACTION USING A SPRING SYSTEM

Magic Specific Attributes Quick Tips Features

Cloth Simulation. COMP 768 Presentation Zhen Wei

Animation Essentially a question of flipping between many still images, fast enough

Animation. Itinerary Computer Graphics Lecture 22

Transcription:

CS-C3100 Computer Graphics Fall 2017 Jaakko Lehtinen Markus Kettunen Dynamical Simulation 1: Particle Systems and ODEs 1 Futuremark Corp., used with permission

Types of Animation Keyframing Procedural Physically-based Particle Systems (today) CERN Smoke, water, fire, sparks, etc. Usually heuristic as opposed to simulation, but not always Mass-Spring Models (Cloth) Thursday Continuum Mechanics (fluids, etc.), finite elements Not in this class Rigid body simulation Not in this class 2

Types of Animation: Physically-Based Assign physical properties to objects Masses, forces, etc. Also procedural forces (like wind) Simulate physics by solving equations of motion Rigid bodies, fluids, plastic deformation, etc. Realistic but difficult to control v 0 m g 3

Control 4

Directable Simulation Relatively new field that aims to produce simulations that obey user-specified constraints Add as-small-as-possible fictitious forces to simulation to nudge it towards artist/td needs Lots of cool stuff! See e.g. http://www.cs.huji.ac.il/labs/cglab/projects/ tdsmoke/ 5

Types of dynamics Point 6

Types of dynamics Point Rigid body Animation by Mark Carlson 7

Types of dynamics Point Rigid body Deformable body (include clothes, fluids, smoke, etc.) Mark Carlson 8

Today We Focus on Point Dynamics Lots of points! Particle systems Borderline between procedural and physicallybased 9

Particle Systems Overview Emitters generate tons of particles Sprinkler, waterfall, chimney, gun muzzle, exhaust pipe, etc. Image Jeff Lander http://www.particlesystems.org/ 10

Particle Systems Overview Emitters generate tons of particles Describe the external forces with a force field E.g., gravity, wind Image Jeff Lander http://www.particlesystems.org/ 11

Particle Systems Overview Emitters generate tons of particles Describe the external forces with a force field Integrate the laws of mechanics (ODEs) Makes the particles move Image Jeff Lander http://www.particlesystems.org/ 12

Particle Systems Overview Emitters generate tons of particles Describe the external forces with a force field Integrate the laws of mechanics (ODEs) In the simplest case, each particle is independent Image Jeff Lander http://www.particlesystems.org/ 13

Particle Systems Overview Emitters generate tons of particles Describe the external forces with a force field Integrate the laws of mechanics (ODEs) In the simplest case, each particle is independent If there is enough randomness (in particular at the emitter) you get nice effects sand, dust, smoke, sparks, flame, water, Image Jeff Lander http://www.particlesystems.org/ 14

Demo Simple waterfall Each particle affected by gravity Simple obstacle geometry (spheres) Braindead rendering (screen-aligned transparent quads) 15

Demo Simple waterfall Each particle affected by gravity Simple obstacle geometry (spheres) Braindead rendering (screen-aligned transparent quads) Could add animated textures and some sounds Note: No interaction between particles. It s not a fluid simulation! But then again, it took under an hour to code up. 16

Real-Time Particles Demo 3DMark03 by Futuremark Corp. Explosions, vapor trails, muzzle flashes are particles Futuremark Corp., used with permission 17

Generalizations Next Lecture Mass-spring and deformable surface dynamics surface represented as a set of points forces between neighbors keep the surface coherent Image Witkin & Baraff Image Michael Kass 18

Cloth Video Selle. A, Su, J., Irving, G. and Fedkiw, R., "Robust High- Resolution Cloth Using Parallelism, History-Based Collisions, and Accurate Friction," IEEE TVCG 15, 339-350 (2009). 19

Generalizations Müller et al. 2005 It s not all hacks: Smoothed Particle Hydrodynamics (SPH) A family of real particle-based fluid simulation techniques. Fluid flow is described by the Navier-Stokes Equations, a nonlinear partial differential equation (PDE) SPH discretizes the fluid as small packets (particles!), and evaluates pressures and forces based on them. Jos Stam 20

SPH Example Predictive-Corrective Incompressible SPH. Barbara Solenthaler, Renato Pajarola. ACM Transactions on Graphics (SIGGRAPH), 2009 21

Meshless Techniques Most simulation techniques work on either regular grids or meshes constructed from triangles/tets PDEs defined on space are discretized on the grid. Regular 3D grid Irregular 2D grid Images: Wikipedia 22

Meshless Techniques Most simulation techniques work on either regular grids or meshes constructed from triangles/tets In contrast, so-called meshless methods do not require the underlying space to be discretized Instead, represent things using points (particles!) They can still be well-founded : SPH is an example. Another example: Point-Based Animation of Elastic, Plastic and Melting Objects (Müller, Keiser, Nealen, Pauly, Gross, Alexa, SCA 2004) Müller et al. 23

Can Model Everything using Particles! Unified Particle Physics for Real-Time Applications (NVIDIA) video 24

Take-Home Message Particle-based methods can range from pure heuristics (hacks that happen to look good) to real simulation Basics are the same: Things always boil down to integrating ODEs! Also in the case of grids/computational meshes Andrew Selle et al. 25

Questions? 26

What is a Particle System? Collection of many small simple pointlike things Described by their current state: position, velocity, age, color, etc. Particle motion influenced by external force fields and internal forces between particles Particles created by generators or emitters With some randomness Particles often have lifetimes Particles are often independent Treat as points for dynamics, but rendered as anything you want http://en.wikipedia.org/wiki/image:particle_emitter.jpg 27

Simple particle system: sprinkler PL: linked list of particle = empty; Image Jeff Lander 28

Simple particle system: sprinkler PL: linked list of particle = empty; spread=0.1;//how random the initial velocity is colorspread=0.1; //how random the colors are Image Jeff Lander 29

Simple particle system: sprinkler PL: linked list of particle = empty; spread=0.1;//how random the initial velocity is colorspread=0.1; //how random the colors are For each time step Image Jeff Lander 30

Simple particle system: sprinkler PL: linked list of particle = empty; spread=0.1;//how random the initial velocity is colorspread=0.1; //how random the colors are For each time step Kill particles that are too old Generate new particles p=new particle(); p->position=(0,0,0); p->velocity=(0,0,1)+spread*(rnd(), rnd(), rnd()); p.color=(0,0,1)+colorspread*(rnd(), rnd(),rnd()); PL->add(p); Image Jeff Lander 31

Simple particle system: sprinkler PL: linked list of particle = empty; spread=0.1;//how random the initial velocity is colorspread=0.1; //how random the colors are For each time step Kill particles that are too old Generate new particles: loop p=new particle(); p->position=(0,0,0); p->velocity=(0,0,1)+spread*(rnd(), rnd(), rnd()); p.color=(0,0,1)+colorspread*(rnd(), rnd(),rnd()); PL->add(p); For each particle p in PL p->position+=p->velocity*dt; //dt: time step p->velocity-=g*dt; //g: gravitation constant glcolor(p.color); glvertex(p.position); Image Jeff Lander 32

Simple particle system: sprinkler PL: linked list of particle = empty; spread=0.1;//how random the initial velocity is colorspread=0.1; //how random the colors are For each time step Kill particles that are too old Generate new particles: loop p=new particle(); p->position=(0,0,0); p->velocity=(0,0,1)+spread*(rnd(), rnd(), rnd()); p.color=(0,0,1)+colorspread*(rnd(), rnd(),rnd()); PL->add(p); For each particle p in PL p->position+=p->velocity*dt; //dt: time step p->velocity-=g*dt; //g: gravitation constant glcolor(p.color); glvertex(p.position); Image Jeff Lander 33

Corresponding Waterfall Demo Code 34

Where do particles come from? Created by generators or emitters Can be attached to objects in the model Given rate of creation: particles/second record t last of last particle created create n particles. update t last if n > 0 http://www.particlesystems.org/ Create with (random) distribution of initial x and v if creating n > 1 particles at once, spread out on path 35

Code from Waterfall Demo 36

Particle Controls In production tools, all these variables are timevarying and controllable by the user (artist) Emission rate, color, velocity distribution, direction spread, textures, etc. etc. All as a function of time! Example: ParticleFX (Max Payne Particle Editor) Custom editor software You can download it (for Windows) and easily create your own particle systems. Comes with examples! This is what we used for all the particles in the game 37

Emitter Controls Again, reuse splines! Controls from ParticleFX by Remedy Entertainment 38

Emitter Controls Again, reuse splines! Controls from ParticleFX by Remedy Entertainment 39

Particle Lifetimes Initialize particle age to 0 at emission Keep track of its age over simulation Use particle age to Remove particles from system when too old Change color or animate texture (flame, puff of smoke) Change transparency (old particles fade) Perhaps also remove particles that are offscreen Careful with this, it only works if the camera is static! 40

Rendering and Motion Blur Often not shaded (just emission, think sparks) But realistic non-emissive particles needs shadows, etc. Most often, particles don t contribute to the z-buffer, i.e., they do not fully occlude stuff that s behind Rendered with z testing on (particles get occluded by solid stuff) Draw a line for motion blur ( x, x+v dt ) Or an elongated quad with texture Metal Gear Solid by Konami 41

Rendering and Motion Blur Metal Gear Solid by Konami 42

Rendering and Motion Blur Often use texture maps (fire, clouds, smoke puffs) Called billboards or sprites Always parallel to image plane Futuremark Corp., used with permission 43

Image from Sameboat 44

Particle Systems Entirely on GPU (it s a link) 45

Questions? Next, dynamics: how the system evolves 46