CO Games Concepts Week 22 Particle systems

Slides:



Advertisements
Similar presentations
Chapter 4: Kinematics in 2D  Motion in a plane, vertical or horizontal  But, the motion in the x- and y-directions are independent, except that they.
Advertisements

Taken from - Chapter 10, sec. 2
Motion in Two Dimensions
Chapter 3 Motion in Two Dimensions
Kinematics II April 20, 2017.
 Calculate the acceleration that this object experiences 30 kg 150 N.
What is Projectile Motion?
Friction and Gravity.
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.
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.
1 CO Games Concepts Week 20 Matrices continued Gareth Bellaby.
Acceleration When an unbalanced force acts on an object it accelerates. An unbalanced force acting on a stationary object will make it move. An unbalanced.
Computer Science Term 1, 2006 Tutorial 3 Assignment 4 – Special Effects.
Kinematics in 2-D Concept Map
Chapter 3 Acceleration Lecture 1
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
© 2010 Pearson Education, Inc. Lecture Outline Chapter 3 College Physics, 7 th Edition Wilson / Buffa / Lou.
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.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
Point Sprites Course Information CVG: Programming 4 My Name: Mark Walsh Website: Recommended.
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.
FORCES OF MOTION Georgia Shared Resources. STANDARDS.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Vectors Chapter 2.  Scalars and vectors : A scalar quantity: is a quantity that has magnitude only. Mass, time, speed, distance, pressure, Temperature.
Projectile Motion Chapter 5.4 – 5.6 Notes. Projectile Motion A projectile is any object that moves through the air or space, acted on only by gravity.
Homework 2 Unit 14 Problems 17, 19 Unit 15. Problems 16, 17 Unit 16. Problems 12, 17 Unit 17, Problems 10, 19 Unit 12 Problems 10, 11, 16, 17, 18 Unit.
Chapter 2 Motion in One Dimension. Kinematics Describes motion while ignoring the external agents that might have caused or modified the motion (Dynamics.
This lecture will help you understand:
Acceleration is the change in velocity per unit time.
CO1301: Games ts 2015 Lecture 6 Vectors Dr Nick Mitchell (Room CM 224)
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.
Projectile Motion Physics Honors.
Motion Physics: Unit 2.
Chapter 11 Section 2.
Warm-Up 09/13/10 Please express the Graphic Vector Addition Sums in MAGNITUDE-ANGLE format (last two pages of PhyzJob packet)
OOP Paradigms There are four main aspects of Object-Orientated Programming Inheritance Polymorphism Abstraction Encapsulation We’ve seen Encapsulation.
FORCES & THEIR EFFECTS In This Topic We Will Learn About:
Motion in One Dimension
Projectile Motion.
Motion How fast is fast?.
Acceleration is the change in velocity per unit time.
Projectile Motion.
Free Fall A state of motion where an object has a constant acceleration because it is only affected by force of gravity - so there can be no air resistance.
MechYr2 Chapter 6 :: Projectiles
Devil Physics Baddest Class on Campus AP Physics
Projectile Motion 2-D Motion.
CHAPTER 10 TABLE OF CONTENTS SECTION 1 MEASURING MOTION
Kinematics Vectors and Motion
Chapter 4 Linear Motion Pages
Would you be surprised if you let go of a pen you were holding and it did not fall?
CO1301: Games Concepts Lecture 22 Particle Systems
Projectile motion can be described by the horizontal and vertical components of motion. Now we extend ideas of linear motion to nonlinear motion—motion.
Vectors & Equilibrium Sara sultan 07/04/2019.
CO1301: Games Concepts Lecture 21 Timing + Quads + Numbers
Acceleration and Free Fall Notes
CO Games Concepts Week 12 Collision Detection
Chapter 10 Work and Energy
BELLWORK 1/04/17 What is a projectile?.
Chapter 4 Linear Motion.
Graphs of Motion.
Vectors add direction to a magnitude.
Free fall and Air Resistance
Use of particle effects within games
Mathematics Vectors a b c LabRat Scientific © 2019.
BELLWORK 1/04/17 What is a projectile?.
College Physics, 7th Edition
Presentation transcript:

CO1301 - Games Concepts Week 22 Particle systems Gareth Bellaby

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 Central concept is that particles have an initial velocity. Gravity is then applied to them. This 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. 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. 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 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 is distance divided by time.

Particle maths So after a period of time the new velocity will be Constant acceleration is: So after a period of time the new velocity will be

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 Could use an array to store all of the particles The particles cycle around Can use a dynamic data structure such as the STL <vector> class. The <vector> class is like a dynamic array. 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 Average velocity is displacement over time 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", http://www.double.co.nz/dust/col0798.pdf Lutz Latta, "Building a Million Particle System." In GDC 2004 Proceedings, http://www.2ld.de/gdc2004/ Lutz Latta, "Everything about Particle Effects", www.2ld.de/gdc2007 More articles at his site: http://www.2ld.de/ John van der Burg, "Building an Advanced Particle System". http://www.gamasutra.com/features/20000623/vanderburg_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