Particle Systems Simulation for special effects.

Slides:



Advertisements
Similar presentations
AERODYNAMICS & THE FOUR FORCES
Advertisements

Graphics Pipeline.
4.9. P ARTICLE E FFECTS Use of particle effects within games.
The Art and Technology Behind Bioshock’s Special Effects
Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor.
OBJECT-ORIENTED THINKING CHAPTER Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity.
Optimizing Flocking Controllers using Gradient Descent
Particle System Design. The Challenge Particle systems vary so much But want some code reuse Option 1: parameterization Option 2: inheritance Option 3:
1Notes  Assignment 2 is out  Flocking references  Reynolds, “Flocks, Herds, and Schools…”, SIGGRAPH’87  Tu and Terzopoulos, “Artificial Fishes…”, SIGGRAPH’94.
1Notes  Textbook: matchmove 6.7.2, B.9. 2 Match Move  For combining CG effects with real footage, need to match synthetic camera to real camera: “matchmove”
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
Particle Systems and Fuzzy Shapes Presented by Dan Cogswell.
Particle Systems GPU Graphics. Sample Particle System Fire and SmokeWater.
1cs426-winter-2008 Notes  If you’re interested, read Bridson, Hourihan, Nordenstam, “Curl noise for procedural fluid flow”, SIGGRAPH ‘07.
Game Physics Chris Miles. The Goal To learn how to create game objects with realistic physics models To learn how to simulate aspects of reality in order.
1cs426-winter-2008 Notes  Please read: C. Reynolds “Flocks, Herds, and Schools…” SIGGRAPH ‘87
Lecture Slides Elementary Statistics Twelfth Edition
1cs426-winter-2008 Notes. 2 Velocity fields  Velocity field could be a combination of pre-designed velocity elements E.g. explosions, vortices, …  Or.
1cs426-winter-2008 Notes  Assignment 1 is out, due immediately after reading week (Feb 25)  Please read: William T. Reeves, "Particle systems: a technique.
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
05/09/02(c) 2002 University of Wisconsin Last Time Global illumination algorithms Grades so far.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Physically Based Animation.
Physically Based Animation and Modeling
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Modelling and Simulation Dynamics. Dynamics Dynamics is a branch of physics that describes how objects move. Dynamic animation uses rules of physics to.
Kinetics of Particles:
Biology: flocking, herding & schooling Day 5 COLQ 201 Multiagent modeling Harry Howard Tulane University.
Javier Junquera Molecular dynamics in the microcanonical (NVE) ensemble: the Verlet algorithm.
CS559: Computer Graphics Lecture 38: Animation Li Zhang Spring 2008 Slides from Brian Curless at U of Washington.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
Particle Systems – Technique for Modeling a Class of Fuzzy Objects Craig Schroeder Computer Graphics I April 22, 2004.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Computer Graphics 2 In the name of God. Outline Introduction Animation The most important senior groups Animation techniques Summary Walking, running,…examples.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
Computer Science Term 1, 2006 Tutorial 3 Assignment 4 – Special Effects.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
CSC505 Particle Systems. CSC505 Object Representations So far we have represented (rendered) objects with –Lines –Polygons (triangles) –Curves These techniques.
Particle Systems (Motion Machines of 2D Objects with Textures) Matthew K. Bowles Advanced Computer Graphics Spring 2004.
Controlling the Behavior of Swarm Systems Zachary Kurtz CMSC 601, 5/4/
Particles Paul Taylor Polygons are not so hot! Good for representing objects like A Cup A Robot A Pyramid Not so hot for creating Hair Snowflakes.
Point Sprites Course Information CVG: Programming 4 My Name: Mark Walsh Website: Recommended.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Multimedia Programming 21: Particle Animation Departments of Digital Contents Sang Il Park.
Graphics Lecture 17: Slide 1 Interactive Computer Graphics Lecture 17: Fire.
Particles and their home in Geometry Shaders Paul Taylor 2010.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
Particle Systems Reference: Reeves W.: "Particle Systems -- A Technique for Modelling a Class of Fuzzy Objets", Computer Graphics, 17(3), pp ,
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Animation Animation is about bringing things to life Technically: –Generate a sequence of images that, when played one after the other, make things move.
Ctrl + Z Sucheta Bhatawadekar Sucheta Bhatawadekar Dan L'Hommedieu Dan L'Hommedieu John Scott John Scott Jonathan Perkins Jonathan Perkins Aaron Cardwell.
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 26 Hair and fur.
Particle Animation and Rendering Using Data Parallel Computation Karl Sims Optomystic Thinking Machines Corporation Presentation ©2001 Brenden Schubert.
A novel approach to visualizing dark matter simulations
Visualization Shading
Foundations of Visualization 10/25/2005 Notes
Data Analysis in Particle Physics
CIS 488/588 Bruce R. Maxim UM-Dearborn
Real-time Procedural Volumetric Fire
UMBC Graphics for Games
CO1301: Games Concepts Lecture 22 Particle Systems
Computer Graphics Lecture 15.
Computer Graphics Introduction to Shaders
Particle Systems - A Technique for Modeling a Class of Fuzzy Objects
CO Games Concepts Week 22 Particle systems
Hiroki Sayama NECSI Summer School 2008 Week 2: Complex Systems Modeling and Networks Agent-Based Models Hiroki Sayama
Use of particle effects within games
Presentation transcript:

Particle Systems Simulation for special effects

Physics of points F=ma, v = ∫adt, x = ∫vdt Without interaction, point physics is very easy Particle systems: – large numbers of points – do not interact with each other – might interact with rest of game world

Particle Systems Use a huge number of points to represent objects or phenomena Usually, motion governed by physics Well-suited to amorphous objects or to phenomena inherently made of points: – smoke, fire, clouds – explosion, fireworks, fountain – rainfall, snowfall, galaxy

Particle Systems

Huge number of particles representing a complex system Each particle has its own properties: – position, velocity – size, shape, color – temperature, mass – age, maximum lifespan All properties are functions of time

Particle Systems Each particle independently obeys its own dynamics The system should have a way of generating new particles Particles generally have a finite lifespan, and die when their time is up (or when other conditions are met) Behavior of generator as important as dynamics

Rendering Particle Systems Particles are points from a dynamics point of view, but can be rendered differently – polygons alpha blended polys texture chips – groups of polygons small models secondary particle system – point sprites (points with texture) available in XNA

Dynamic Rendering Rendering parameters can be functions of time – control color directly – derive color from temperature – material parameters changing – dynamic textures

Particle Dynamics Position, velocity, other characteristics of particles change over time Can determine future state of system from present state Updates made by numerical integration (e.g., Euler integration, Runge-Kutta integration)

Generator Dynamics Can obtain many interesting effects by adding dynamics to the generator Simple generator: fixed position, fixed distribution of outgoing particles (e.g., fountain) More complex generators: changing position, changing parameters of outgoing particles (e.g., comet, rocket; arbitrarily complex generator shape)

"Self-Breathing Head" – Sims, 1990

Particle Dynamics Gravity: – constant force (F=mg) – on the large scale: F = GMm/r 2 Orbital dynamics: force along radius, but nonzero velocity perpendicular to radius leads to elliptical trajectories

Particle Dynamics Air resistance (wind resistance) – F = μ∆v, for coefficient of friction μ, difference in velocities ∆v – Force direction opposed to velocity difference In still air, ∆v = -v If air is moving, need to know wind direction and magnitude – simple models often suffice

Particle Dynamics Can add in whatever force terms you like – Radial force in xy-plane, no force in z-direction: helical paths – Derive forces from sampling a texture (especially procedural texture): chaotic, unpredictable paths – Forces based on behaviour of nearby particles

Fireworks Simple dynamics, well-defined rules for birth and death – dynamics: F=mg is only force – death: either by explosion (lifespan expires) or on striking the ground – birth: in explosion event, some number of new particles are created initial position: at location of explosion initial velocity: random distribution around velocity of exploding particle

Particle Trails Not all particles need the same dynamics Simple way of producing trails: each active particle leaves behind a trail of inactive particles Inactive particles: may change color, transparency, etc., but location not subject to dynamics Once used for modeling (e.g., grass) – rarely used this way now – sometimes still see it: Neubert et al, SIGGRAPH 2007; Xu & Mould, Cae 2009

Point Sprites Primitive designed for particle systems – point with spatial extent – oriented towards camera (exists in screen space and world space) – has texture (but no texture coordinates)

Point Sprites Upside: extremely useful for special effects – good performance – particle systems well understood Downside: XNA functionality lacking – need to create custom vertex declaration – need to write custom shader

Custom Vertex Declaration Create a structure that contains your data – position (location in 3D) – size (spatial extent around central position) – color (optional) – other stuff your shader might want... plus methods – getters and setters for data (optional) – VertexElements: detailed description of data

VertexElement One VertexElement has: – stream it is read from (typically 0) – offset from beginning of list (starts at 0, counts up) – data type (such as VertexElementFormat.Vector3) – render-time method (often VertexElementMethod.Default) – usage for data (such as VertexElementUsage.Position) – counter for semantic (0 for first, 1 for second...)

VertexElements array of VertexElement items – one for each piece of data – note: calculate offset by accumulating the size of the elements listed so far – Ugly, but has to be done once for each different particle type you want

Custom Shader Create vertex and pixel shader as before Note: input to vertex shader should have: – same data as specified in vertex format – same semantics used (eg, PSIZE0) – data should be in the same order Vertex shader should spit out UV 1.0,1.0 if texture-mapped particle is desired

Point Size Semantic PSIZE: shader semantic we haven't used before – represents radius of point – single floating point value PSIZE must be part of vertex shader output – Can calculate point size in vertex shader, or just pass through input point size – PSIZE is not available to be modified in pixel shader (too late)

Focus on Dynamics Important things: – appearance of individual particles – how the appearance changes over time become smaller, fade, change color – how the particles move – how the particles are born and die Relatively unimportant: – details of setting up vertex format, etc. – necessary, but look it up when you need it

Flocking Designed for flock/school dynamics Particles with this particular behaviour called 'boids' Boids know where other nearby boids are, and react to what is going on

Flocking Each boid obeys only its own local rules, yet an overall flock behaviour results Cited as an example of emergence: local rules produce global behaviour Unpredictable complexity can arise from repeated application of seemingly simple rules Exploited in graphics for data amplification

Boid Rules Separation: each boid tries to avoid getting too close to any other boid Alignment: each boid tries to match its velocity with that of its flockmates Cohesion: each boid tries to move towards the center of the flock These simple rules provide extremely robust flocking behaviour