CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.

Slides:



Advertisements
Similar presentations
This terms course Last term we both worked on learning 2 things –Processing –The concepts of graphics etc. This term will focus more on the basic concepts.
Advertisements

4.9. P ARTICLE E FFECTS Use of particle effects within games.
Taken from - Chapter 10, sec. 2
Unit 3 Kinematics Equations
Module 11 Movement and change.
Particle Systems GPU Graphics. Sample Particle System Fire and SmokeWater.
Physics 218: Mechanics Instructor: Dr. Tatiana Erukhimova Lectures 6,7.
Physical Science – Chapter 3 Study Guide Answers
Chapter 3 Motion in Two Dimensions
1cs426-winter-2008 Notes. 2 Velocity fields  Velocity field could be a combination of pre-designed velocity elements E.g. explosions, vortices, …  Or.
. They all fall at the same rate!  Air Resistance o Force in the opposite direction of the motion of an object through air o Also called drag o Can.
Ch Displacement, Velocity, and Acceleration.
Kinematics II April 20, 2017.
 Calculate the acceleration that this object experiences 30 kg 150 N.
What is Projectile Motion?
Motion in One Dimension Average Versus Instantaneous.
Friction and Gravity.
Motion occurs when an object changes position.
Modelling and Simulation Dynamics. Dynamics Dynamics is a branch of physics that describes how objects move. Dynamic animation uses rules of physics to.
Kinematics in Two Dimensions Chapter 3. Expectations After Chapter 3, students will:  generalize the concepts of displacement, velocity, and acceleration.
KINEMATICS OF PARTICLES PLANE CURVILINEAR MOTION
Energy. Before we start, let’s see how much you remember… List as many different types of energy as you can What is energy? What is work? Is work.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Physics The study of physical forces and qualities: the scientific study of matter, energy, force, and motion, and the way they relate to each other The.
DISPLACEMENT AND VELOCITY Chapter 2-1. Objectives Describe motion in terms of frame of reference, displacement, time and velocity. Calculate displacement,
1 CO Games Concepts Week 20 Matrices continued Gareth Bellaby.
Gravity, Weight and Mass
Constant Acceleration
Computer Science Term 1, 2006 Tutorial 3 Assignment 4 – Special Effects.
Kinematics in One Dimension We will focus today on problem- solving. Note: some problems are hard, some are not so hard. Part of the learning is recognizing.
Kinematics in 2-D Concept Map
Chapter 6 Forces In Motion
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Chapter 3 Acceleration Lecture 1
Chapter 2 Kinematics in one Dimension June 4, 2016.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Physics The study of physical forces and qualities: the scientific study of matter, energy, force, and motion, and the way they relate to each other The.
Motion In Two Dimensions can be considered constant.
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.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Parachutes & Drag LO: Investigate how area can affect air resistance.
Chapter 2 Describing Motion: Kinematics in One Dimension.
4.5 Free Fall. Falling Objects Imagine there is no air resistance and that gravity is the only thing affecting a falling object. An object moving under.
Motion in Two Dimensions
Graphics Lecture 17: Slide 1 Interactive Computer Graphics Lecture 17: Fire.
Particles and their home in Geometry Shaders Paul Taylor 2010.
FORCES OF MOTION Georgia Shared Resources. STANDARDS.
Unit 2- Force and Motion Vocabulary- Part I. Frame of Reference  A system of objects that are not moving with respect to each other.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Sections 1.Describing and Measuring Motion 2.Acceleration 3.The Nature of Force 4.Force, Mass, and Acceleration 5.Friction and Gravity 6.Action and Reaction.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Branches of Physics. Study of how things move without considering the cause of motion. This branch of physics only deals with describing how something.
Bell Ringer You throw a football horizontally, and drop a football from the same height and at the same time. Which will hit the ground first? PLEASE.
Galileo Galilei ( ) "You must read the book of Nature... In other words, observe and do experiments. This is against the medieval idea of scholasticism--that.
Motion and Energy. Motion What is Motion? Position is the location of an object. Motion is a change in position over time. Motion has two parts: distance.
Vectors Chapter 2.  Scalars and vectors : A scalar quantity: is a quantity that has magnitude only. Mass, time, speed, distance, pressure, Temperature.
Chapter 2 Motion in One Dimension. Kinematics Describes motion while ignoring the external agents that might have caused or modified the motion (Dynamics.
CO1301: Games ts 2015 Lecture 6 Vectors Dr Nick Mitchell (Room CM 224)
Projectile Motion.
Projectile Motion.
Devil Physics Baddest Class on Campus AP Physics
CO1301: Games Concepts Lecture 22 Particle Systems
CO1301: Games Concepts Lecture 21 Timing + Quads + Numbers
Acceleration and Free Fall Notes
CO Games Concepts Week 22 Particle systems
Graphs of Motion.
Vectors add direction to a magnitude.
Mathematics Vectors a b c LabRat Scientific © 2019.
BELLWORK 1/04/17 What is a projectile?.
Presentation transcript:

CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby Lecture 15 Particle Systems

Particle systems  A particle system is a simulation of phenomenon such as smoke, rain or fire as a set of discrete particles.  Discrete means separate.  The different type of effects are created by changing:  textures  blending  colour  physics of the system

Efficiency  Typically quads are used:  Faster than a model with depth.  Orientated towards the camera so that they always appear 3D.

Emitters  A particle system has an emitter.  Particles come out of the emitter.  They have an initial velocity.  They have a lifetime.  This could be dependent upon time (e.g. die after a certain point) or location (e.g. die when they hit the ground)  You could re-use a particle after it has died. A particle that has died is re-emitted. In this way the particles cycle around and around. A system has been created.

Basic physics of the system  The central concept is that particles have an initial velocity, and then gravity is then applied to them.  Gravity will change the velocity of the particle over time.  Different particles in the system will be moving at different speeds.  Gravity only affects the y-component.  You could apply other forces:  e.g. drag because of air resistance.  swirling because of wind.

Types of particle systems  The appropriate physics is applied to the particles.  No hard and fast rules:  It is a matter of aesthetics and the effect you want to achieve...

Fountain  Single point emitter.  Particles are emitted in a small fan.  Fast initial velocity.  Blue particles  Blend so that overlaid textures darken.  Physics is an initial velocity outwards. Gravity then pulls the particles downwards.  Gravity causes them to fall after a period.  Destroyed when hit the ground.

Smoke  Single point emitter  Grey particles.  Blend so that overlaid textures darken  Smoke gently rises (because smoke is light and the emitter is a heat source)  The air is hot so it rises and the smoke is light and gets carried along.  A small amount of gravity.  Destroyed after a certain amount of time.  Could use swirling, e.g. employ noise.

Rain  Surface emitter  Grey particle.  Maybe use a streak.  Blend with high transparency.  Probably little or no overlay.  Drop downwards with a constant velocity.

Fire  Red/yellow particles  Blend so that overlaid textures lighten.  Single emitter  Short lifetime.  Higher velocity.  Die quickly.

Explosion  Red/yellow particles  Single emitter.  May all be emitted at same time. Some may be delayed.  Emitted in all directions or in a wide fan.  High velocity.  See Steve Rabin, "Powerful Explosion Effects Using Billboard Particles", Game Programming Gems 5.

Particle maths  Velocity v is distance d divided by time t.

Particle maths  Constant acceleration is the rate of change in velocity:  So after a “period of time” the new velocity will be the old velocity plus the amount of change over that time period:

Particle maths  Need to look at velocity and acceleration  Velocity is units per second, e.g. metres per second  Acceleration is units per second per second, e.g. metres per second per second  This is important when taking time into account.  Using the frame time, apply the velocity but multiply the velocity by the frame time.

Particle maths  If we want to calculate the effect of acceleration:  calculate the new velocity using the frame time  apply the velocity and again multiply the velocity by the frame time.  Note the way that frame time is implicitly taken into account twice because it is units per second per second.

Programming: data structure  We could use an array to store all of the particles  The particles cycle around  We can use a dynamic data structure such as the STL class.  The class is like a dynamic array.  Dynamic in the sense that you can change it’s size on-the-fly at run-time.  It has nothing to do with the vectors of 3D graphics despite its name.  Why not research this yourself.  I may well add it to the summer work...

Euler integration  Stateful version.  Version you will use in the lab.

Euler integration  Expressed as a position

Varying the direction  Want all of the particles to have the same initial velocity.  Nice to have the particles "fan out" from the emitter.  Random element.  Offset in the along the x-axis.  Use the maths of right-angle triangles to calculate the components of the movement vector.

Varying the direction

Closed function  There is an alternative way of thinking about the maths of particle systems.  Stateless version.  Used by Luna in his chapter on particle systems.  Simple.  Drawback is that it only uses the one acceleration: so you can't apply other physics to the particles in mid-movement.

Closed function  Do not need to record the velocity frame by frame.  Simply need the starting velocity, acceleration and the time passed since the particle was at that starting velocity.

Closed function

Maths  Want to find the average velocity over a period of time. Acceleration is a constant. Therefore can do a simple average.  Average velocity is displacement over time

Maths  These are equivalent, so let's put them together.

Maths  Can substitute one of the earlier equations into this (from slide 13)

Other variants exist  May want sometimes to employ other variants.  Also useful to combine different accelerations.  See Latta and the maths books

References  Jeff Lander, "The Ocean Spray in Your Face",  Lutz Latta, "Building a Million Particle System." In GDC 2004 Proceedings,  Lutz Latta, "Everything about Particle Effects",  More articles at his site:  John van der Burg, "Building an Advanced Particle System". erburg_01.htm

References  Van Verth, Essential Mathematics for Games and Interactive Applications: A Programmer's Guide.  Wendy Stahler, Beginning Math and Physics for Game Programmers  NVidia developers site  ATI developers site