Particlebased Fire Simulation An Intro to Some Other
Particle-based Fire Simulation & An Intro to Some Other Techniques By Jennifer Baulier
Why Fire? CGI in live action Movies Computer animation Video Games Making virtual environments exciting Fire safety/parts testing
Thinking About Fire
Requirements of a Fire Fuel: decomposes to gas due to heat but can start in any state Heat: indicator of motion of an object's molecules Fast enough motion is what leads to a change in phase Oxygen: used in combustion, but when it is low flames will become smoke (incomplete oxidization)
Ambient/Calm Constant fuel Few force changes Freely Fed (most common) Lots of oxygen and fuel Small variance over t and x Violent Big external forces Unusual fuel distribution Pressure Fed “Genres” of Fire Like freely fed Velocity vector fuel as it goes in the air Explosion Compressed fuel ignites Shock waves lead to a chain reaction
Looking at Fire Black Body Palette describes the radiation from fire Gas motion is affected by wind, temperature, and thermal buoyancy Gasses moving at different speeds swirl when interacting Thermal Buoyancy: force due to differences in air density Hot gas rises Turning occurs due to increased drag as the gas cools Fuel also expands making the fire look full
Simulating Fire
An Aesthetic Approach Applications like movies may prefer aesthetic approaches Dreamworks sponsored research into such a method for Shrek (2002) Probability was used to model flickering and buoyancy Artists could adjust wind field noise and other factors Allows for more dynamic movement Scales better (making a very large fire wasn't really possible with reasonably detailed physical approaches of the time) Aspects such as spread were controlled manually
Broad Types of Physical Simulations Particle based (the first) Fluid based (primarily Navier-Stokes) Flame based
Why is this Focused on Particle Systems? Movies use pipeline rendering where every frame is precomputed Could take hours to render 1 frame (2007) Particles still seem to be all that's used in real time Easily able to scale and adapt Easy to change the appearance Randomness can be introduced avoiding repetition
Proof of Particle System's Adaptability A project was done using Computer Unified Device Architecture for Nvidia GPUs Rendering directly to the GPU + parallelism Tested one method of particle movement with different particle primitives & # of particles Point was to gather speed statistics More realistic models take longer but that's a trade off 16384 GL LINES 16384 particles; 16384 GL 16384 particles: CUDA-Open. GL TRIANGLES Texture Mapping vertex color array 65535 GL POINTS 16384 GL PONTS 262144 GL POINTS
Rendering Techniques to add Further Variation Texture Splatting = layering textures at different depths with varying transparencies (opacity map) Bitmap Splatting = project onto raster and blend new with what was there before Adding Radiance Ray tracing
Ray Tracing with Particles Sphere or blob goes around each particle Each pixel sends a ray and takes part of it's color from every blob in intersects A background object gives color too making flame density noticeable
Another method of Ray Tracing Can instead make a surface around the set of particles Color each point based on calculated temperature from the particles Recompute surface with every movement step More realistic because flames only appear at the surface where oxygen mixes with fuel
Common Attributes used to determine the motion of a Fire Particle Position [x, y, z] Velocity [u, v, w] Mass (m) Temperature (t) Life Time (T) Can start with basic F = MA Realistically would have damping force due to viscous drag Other forces will vary based on the complexity of the specific simulation
First Commercial CGI Explosion Star Trek “The Wrath of Khan” Particle based but couldn't yet be real time Spawn points in concentric circles on the surface of the moon Rings activate over time to show spreed Particles are small straight lines Particle's velocity angle and magnitude are normally distributed within a cone about the spawn's normal
Star Trek Continued Wrath of Khan video Moves like projectile under gravity On a moon gravity would be opposite the normal Dies before parabolic motion is noticeable The range of possible velocity at a spawn point may decrease over time Over time the particle's color changes according to the black body palette There is a light over the moon that increases range to always shine just outside the spread of the fire
How to Create More Realistic Movement Systems Gas particles rise, spread out, and swirl not move like projectiles To create some of these properties fields are required For a 2 D environment attributes will be assigned to squares in a grid For a 3 D environment space will be discretized into shapes such as voxels and each voxel which will have attributes assigned to them Gas swirling doesn't really occur without fluid simulation techniques
Ways fields can be used Different forces will be attributes of the grid space the particle is in, and these will be added to the summed Force used in the Euler or RK methods Force fields can simulate wind, other external forces, and ensure rising A voxel can have a pressure force based on number of particles: creates diffusion/spread Needs to be recomputed every frame Some randomness in the force field can simulate turbulence Velocity fields directly set the particles velocity while in a grid space Create stream lines for particles, though on their own will always be the same Combining these can create more complex looking motion
A specific Example that Uses a Field to Determine Motion “Real Time Fire Simulation” University of Texas User chooses 2 D shape for the fuel Also picks a spawn point Particle spawn position follows a Gaussian distribution Movement: Thermal buoyancy Brownian motion User defined wind field
More on the Motion in this example Brownian motion creates some turbulence Buoyancy = primarily vertical movement ai=cbri + ct. Tij + w ai = acceleration of particle i cb = a coefficient for Brownian Motion ri = a random vector (x, y, z) ct = a coefficient for thermal Buoyancy Ti= temperature of the particle i j = the z unit vector w = wind and other external forces The particle's T decreases a random amount every step Cools faster far away from the source & other particles When cool enough a particle becomes smoke (different m is max over all particles movement) c indicates the spawn point x, y, z are the coordinates i is the current particle C 1, C 2 < 1 is a coefficient
Fluid-based Simulation (overview) 3 major fields: Velocity, Density, and Temperature Each field is defined using partially differentiable Navier-Stokes equations are based on Newton's 2 nd law Force = change in momentum A fluid's stress being based on viscosity & pressure Fields frequently need to be recalculated (A fluid based simulation using Navier-Stokes that runs solely on the GPU)
Flame Based Simulation (Overview) The flame itself is a primitive Has a more distinct outline Fire's boundary vertices spreads -Velocity of vertices is based on surface orientation, amount of oxygen, and density of fuel May not always need to recompute boundary hull If an area is too sparse remove boundary vertex
Modeling Flames sit inside burning zone's surface Skeleton of flame changes based on an air velocity field Flame may change size over time Vertices solved for using Euler's method Modify length of skeleton not just vertex positions If air turbulent enough allow part of the skeleton to break off
Displaying Flames Define an implicit surface Compute color using iso surfaces based on the distance from the base Render with ray tracing
Other Phenomenon Needed for full Realism Smoke Burn marks Decomposing Crumbling/cracking Bending Realistic Spread based on flammability of items
Article and Website Citation Kruijf, Mark de. (2007). 'firestarter – A Real Time Fire Simulator'. Computer Science Capstone, The University of Wisconsin, Madison. Foster N. , Metaxas D. (1997). “Modeling the motion of a hot, turbulent gas. ” Proceedings of the 24 th annual conference on Computer graphics and interactive techniques, August 1997. Nguyen, D. , Fedkiw R. , Jensen H. (2002). “Physically based modeling and animation of fire. ” Proceedings of the 29 th annual conference on computer graphics and interactive techniques, San Antonio, Texas, July 2002. Nielsen, T. E. (1999). “Modeling, animation, and visualization of fire. ” Master's thesis, University of Copenhagen, Denmark, April 1999. "Circus High-Diving with Virtual Reality Marketing Bar Tour!" <i>Inition</i>. 30 May 2014. Web. 25 Nov. 2014. <http: //www. inition. co. uk/inition-critical-masscollaborate-virtual-high-dive-experience/>. Lamorlette A. , Foster N. (2002). “Structural modeling of flames for a production environment”, Proceedings of the 29 th annual conference on Computer graphics and interactive techniques, San Antonio, Texas, July 2002. Gillies, Duncan. "Graphical Simulation of Fire. " Graphics, Lecture 17. Imperial College of London Department of Computing. London. Lecture. <https: //www. doc. ic. ac. uk/~dfg/graphics/Graphics. Lecture 17. pdf>. Reeves et al (SIGGRAPH 1983 17(3) 359 -376). Cutler, Barb. Computer Animation & Particle Systems" Advanced Computer Graphics. RPI. Rochester, NY. Lecture. <http: //www. cs. rpi. edu/~cutler/classes/advancedgraphics/F 05/lectures/08_particle_systems. pdf >. Santikonga, Sarayuth. (2009). “Real-time Fire Simulation” thesis, University of Texas, San Antonio, 2009. "Stack Effect. " Wikipedia. Wikimedia Foundation, 24 Nov. 2014. Web. 26 Nov. 2014. < http: //en. wikipedia. org/wiki/Stack_effect> . Lyes, T. S. and Hawick, K. A. (2013). “Fire and Flame Simulation using Particle Sytems and Graphical Processing Units”, Massey University, Auckland, New Zealand, February 2013. <http: //worldcomp-proceedings. com/proc/p 2013/MSV 2342. pdf> P. Beaudoin, S. Paquet, P. Poulin (2001). Realistic and Controllable Fire. Simulation. Universite de Montreal, 2001. Steinemann, Denis. "Simulation and Animation of Fire. " (2002). Computer Graphics Laboratory, ETH, zurich. Lecture. <http: //graphics. ethz. ch/Downloads/Seminar_Arbeiten/2002_03/steinemann_fire. pdf>. "Navier–Stokes Equations. " <i>Wikipedia</i>. Wikimedia Foundation, 12 Jan. 2014. Web. 1 Dec. 2014. < http: //en. wikipedia. org/wiki/Navier–Stokes_equations> .
Image and Video Citation Harry Potter and the Goblet of Fire Toy Story 3 Fire Eater (fire rings). Web. < http: //www. inition. co. uk/inition-critical-mass-collaborate-virtual-high-dive-experience/ > New Super Mario Bros Parts of a fire diagram <http: //intraweb. stockton. edu/eyos/namslabs/content/images/health_safety/tetra. jpg > Candle <https: //creditingmarvels. files. wordpress. com/2013/10/candle-1. jpg > Burning buildings <http: //blog. burningman. com/wp-content/uploads/2012/09/blog 4. jpg > Wind blown fire<http: //achangeinthewind. typepad. com/. a/6 a 00 d 8341 c 7 b 3653 ef 010535 f 56 e 07970 c-800 wi > Boiler <http: //www. trianglebiofuels. com/blog/wp-content/uploads/2012/10/firetube-boiler. jpg > Independence Day Black Body Radiation image: Nielsen, T. E. (1999). “Modeling, animation, and visualization of fire. ” Master's thesis, University of Copenhagen, Denmark, April 1999. Shrek Texture Splat Image: Wei X. , Li, W. , Mueller, K. , Kaufman, A. (2002). “Simulating fire with texture splats. ” Proceedings of the conference on Visualization '02, October 27 -November 01, 2002, Boston, Massachusetts Fountain, velocity Cone, ray tracing <https: //www. doc. ic. ac. uk/~dfg/graphics/Graphics. Lecture 17. pdf> Star Trek Wrath of Khan Cocentric Circles on a planet<http: //www. cs. rpi. edu/~cutler/classes/advancedgraphics/F 05/lectures/08_particle_systems. pdf > Gaussian Distribution: <http: //books. google. com/books? id=l. ODW 3 QEmi 6 o. C&pg=PA 8&lpg=PA 8&dq=simulating+fire+with+particles&source=bl&ots=9 zrje. M 8 gh. Y&sig=Ru. P 9 Bf 5 o. PQb 2 O 7 S 4 O_fpr. YDIw. QA&hl=en&sa=X&ei=p 5 QXVJX 9 AYq. Qs. QSeo 4 CYDQ &ved=0 CDAQ 6 AEw. Ajg. K#v=onepage&q=simulating%20 fire%20 with%20 particles&f=false > Particle Sytems modeled with different GL primatives, VBOs, and texture maps < http: //worldcomp-proceedings. com/proc/p 2013/MSV 2342. pdf > You. Tube. “GPU fluid simulation – fire”. Online Video Clip. Youtube, November 24, 2007. Web. November 25, 2007. <https: //www. youtube. com/watch? v=Zgo. Dyp. GMV 50> Flame base method pictures and diagrams: Lyes, T. S. and Hawick, K. A. (2013). “Fire and Flame Simulation using Particle Sytems and Graphical Processing Units ”, Massey University, Auckland, New Zealand, February 2013. <http: //worldcomp-proceedings. com/proc/p 2013/MSV 2342. pdf > Flame based method diagrams may have been originally from: P. Beaudoin, S. Paquet, P. Poulin (2001). Realistic and Controllable Fire. Simulation. Universite de Montreal, 2001 Images of other effects (last slide) < http: //research. cs. tamu. edu/keyser/Papers/Melek. Dissertation. pdf >. Navier-Stokes Equations: <http: //en. wikipedia. org/wiki/Navier%E 2%80%93 Stokes_equations>
- Slides: 28