Particle system: Difference between revisions

Content deleted Content added
m fixed typo
replaced Unreal Engine#Unreal Engine 3|Unreal Engine 3 with Unreal Engine 3
 
(17 intermediate revisions by 12 users not shown)
Line 2:
{{about|3D computer graphics|the computer game developer|Particle Systems}}
{{inline|date=January 2018}}
[[File:particle sys fire.jpg|thumb|A particle system used to simulate a fire, created in [[3dengfx]].]]
[[File:particle sys galaxy.jpg|thumb|''Ad hoc'' particle system used to simulate a galaxy, created in 3dengfx.]]
[[File:Pi-explosion.jpg|thumb|A particle system used to simulate a bomb explosion, created in [[particleIllusion]].]]
A '''particle system''' is a technique in [[game physics]], [[motion graphics]], and [[3D computer graphics|computer graphics]] that uses many minute [[sprite (computer graphics)|sprite]]s, [[3D model]]s, or other graphic objects to simulate certain kinds of "fuzzy" phenomena, which are otherwise very hard to reproduce with conventional rendering techniques – usually highly [[Chaos theory|chaotic]] systems, natural phenomena, or processes caused by chemical reactions.
 
Line 20:
| access-date=2018-06-13
| citeseerx=10.1.1.517.4835
| s2cid=181508
}}</ref> other examples include replicating the phenomena of [[fire]], [[explosion]]s, [[smoke]], moving [[water]] (such as a [[waterfall]]), [[Electric spark|spark]]s, [[leaf|falling leaves]], [[Rock (geology)|rock]] falls, [[cloud]]s, [[fog]], [[snow]], [[dust]], [[meteor]] tails, [[star]]sstars and [[galaxy|galaxies]], or abstract visual effects like glowing trails, [[magic (illusion)|magicspell]] spellss, etc. – these use particles that fade out quickly and are then re-emitted from the effect's source. Another technique can be used for things that contain many [[:wikt:strand|strand]]s – such as [[fur]], [[hair]], and [[grass]] – involving rendering an entire particle's lifetime at once, which can then be drawn and manipulated as a single strand of the material in question.
 
Particle systems are defined as a group of points in space, guidingguided by a collection of rules defining behavior and appearance. Particle systems model phenomena as a cloud of particles, using [[stochastic processes]] to simplify the definition of [[dynamical system]] and [[fluid mechanics]] with that are difficult to represent with [[affine transformations]].<ref>{{cite journal
| vauthors = Hastings EJ, Guha RK, Stanley KO
| date = 2008-12-09
| title = Interactive evolution of particle systems for computer graphics and animation
| url = https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.365.5720&rep=rep1&type=pdf
| journal = IEEE Transactions on Evolutionary Computation
| volume = 13
| issue = 2
| pages = 418-32418–32
| doi = 10.1109/TEVC.2008.2004261
| pmc =
| pmid =
| citeseerx = 10.1.1.365.5720
| access-date = 2022-01-17
| s2cid = 11390585
}}</ref>
 
Line 45 ⟶ 46:
 
=== Emission stage ===
An emitter implements a spawning rate (how many particles are generated per unit of time), the particles' initial velocity vector (the direction they are emitted upon creation). When using a mesh object as an emitter, the initial velocity vector is often set to be [[Surface normal|normal]] to the individual face(s) of the object, making the particles appear to "spray" directly from each face but this is optional.
 
=== Simulation stage ===
Line 51 ⟶ 52:
 
=== Rendering stage ===
After the update is complete, each particle is rendered, usually in the form of a [[texture mapped|textured]] [[sprite (computer graphics)|billboarded]] [[Quadrilateral|quad]] (i.e. a quadrilateral that is always facing the viewer). However, this is sometimes not necessary for games; a particle may be rendered as a single pixel in small resolution/limited processing power environments. Conversely, in motion graphics particles tend to be full but small-scale and easy-to-render 3D models, to ensure fidelity even at high resolution. Particles can be rendered as [[Metaballs]] in off-line rendering; [[isosurface]]s computed from particle-metaballs make quite convincing liquids. Finally, 3D mesh objects can "stand in" for the particles — a snowstorm might consist of a single 3D snowflake mesh being duplicated and rotated to match the positions of thousands or millions of particles.<ref>{{cite journalbook
| vauthors = Sims K
| journal title = Proceedings of the 17th annual conference on Computer graphics and interactive techniques
| title chapter = Particle animation and rendering using data parallel computation
| date = 1990-09-01
| chapter-url = https://www.karlsims.com/papers/ParticlesSiggraph90.pdf
| title = Particle animation and rendering using data parallel computation
| url = http://www.cs.duke.edu/courses/cps124/spring08/assign/03_papers/p405-sims.pdf
| journal = Proceedings of the 17th annual conference on Computer graphics and interactive techniques
| volume =
| issuepages = 405–413
| pagesdoi = 405-41310.1145/97879.97923
| doi =
| pmc =
| pmid =
| isbn = 0897913442
| s2cid = 2791741
| access-date = 2022-01-17
}}</ref>
Line 69 ⟶ 71:
In 1983, Reeves defined only '''animated''' points, creating moving particulate simulations — sparks, rain, fire, etc. In these implementations, each frame of the animation contains each particle at a specific position in its life cycle, and each particle occupies a single point position in space. For effects such as fire or smoke that dissipate, each particle is given a [[fade (filmmaking)|fade out]] time or fixed lifetime; effects such as snowstorms or rain instead usually terminate the lifetime of the particle once it passes out of a particular [[field of view]].<ref name="reeves"/>
 
In 1985, Reeves extended the concept to include rendering the entire life cycle of each particle simultaneously, the result transforms particles into '''static''' strands of material that show the overall trajectory, rather than points. These strands can be used to simulate hair, fur, grass, and similar materials. The strands can be controlled with the same velocity vectors, force fields, spawning rates, and deflection parameters that animated particles obey. In addition, the rendered thickness of the strands can be controlled and in some implementations may be varied along the length of the strand. Different combinations of parameters can impart stiffness, limpness, heaviness, bristliness, or any number of other properties. The strands may also use [[texture mapping]] to vary the strands' color, length, or other properties across the emitter surface.<ref>{{cite journal |last1=Reeves |first1=William T. |last2=Blau |first2=Ricki |title=Approximate and probabilistic algorithms for shading and rendering structured particle systems |journal=ACM SIGGRAPH Computer Graphics |date=July 1985 |volume=19 |issue=3 |pages=313–322 |doi=10.1145/325165.325250}}</ref>
| vauthors = Reeves WT, Blau R
| date = 07-01-1985
| title = Approximate and probabilistic algorithms for shading and rendering structured particle systems
| url = https://dl.acm.org/doi/abs/10.1145/325165.325250
| journal = ACM siggraph computer graphics
| volume = 19
| issue = 3
| pages = 313-22
| doi =
| pmc =
| pmid =
| access-date = 2022-01-18
}}</ref>
 
In 1987, Reynolds introduces notions of [[Flocking (behavior)|flocking]], [[herding]] or [[Shoaling and schooling|schooling]] behavioursbehaviors. The extended motion of '''[[Boids|boids model]]''' includesextends obstacleparticle avoidancesimulation andto include external state interactions betweenincluding goal seeking, collision avoidance, flock centering, and limited particlesperception.<ref>{{citeCite journalbook
| vauthors last1= Reynolds C
| first1=Craig
| date = 1987-08-01
| journal title= Proceedings of the 14th annual conference on Computer graphics and interactive techniques
| title = Flocks, Herds, and Schools: A Distributed Behavioral Model
| chapter=Flocks, herds and schools: A distributed behavioral model
| url = https://courses.cs.duke.edu/fall01/cps124/resources/p25-reynolds.pdf
| date = 1987-08-01
| journal = Proceedings of the 14th annual conference on Computer graphics and interactive techniques
| author1-link=Craig Reynolds (computer_graphics)
| volume = 21
| year=1987
| issue = 4
| publisher=[[Association for Computing Machinery]]
| pages = 25-34
| pages=25–34
| doi =
| isbn=978-0-89791-227-3
| pmc =
| doi=10.1145/37401.37406
| pmid =
| citeseerx=10.1.1.103.7187
| access-date = 2022-01-18
| s2cid=546350
}}</ref>
}}</ref>
 
In 2003, Müller extended particle systems to [[fluidics]] by simulating [[viscosity]], [[pressure]] and [[surface tension]], and then rendered surfaces by interpolating the discrete positions with [[Smoothed Particle Hydrodynamics]].<ref>{{cite journal
Line 114 ⟶ 104:
}}</ref>
 
{{multiple image
| align = center
| image1 = Particle Emitter.jpg
| width1 = 220
| caption1 = A cube emitting 5000 animated particles, obeying a "gravitational" force in the negative Y direction.
| image2 = Strand Emitter.jpg
| width2 = 220
| caption2 = The same cube emitter rendered using static particles, or strands.
}}
 
== Developer-friendly particle system tools ==
Particle systems code that can be included in game engines, digital content creation systems, and effects applications can be written from scratch or downloaded. [[Havok (software)|Havok]] provides multiple particle system APIs. Their Havok FX API focuses especially on particle system effects. [[Ageia]] - now a subsidiary of [[Nvidia]] - provides a particle system and other game physics API that is used in many games, including [[List of Unreal Engine games#Unreal Engine 3|Unreal Engine 3]] games]]. Both [[GameMaker Studio]] and [[Unity (game engine)|Unity]] provide a two-dimensional particle system often used by [[indie art|indie]], hobbyist, or student game developers, though it cannot be imported into other engines. Many other solutions also exist, and particle systems are frequently written from scratch if non-standard effects or behaviors are desired.
 
==See also==
Line 133 ⟶ 126:
== External links ==
* [https://www.lri.fr/~mbl/ENS/IG2/devoir2/files/docs/particles.pdf The ocean spray in your face.] — [[Jeff Lander]] (Graphic Content, July 1998)
* [https://web.archive.org/web/20080324220305/http://www.gamasutra.com/view/feature/3157/building_an_advanced_particle_.php Building an Advanced Particle System] — John van der Burg ([[Gamasutra]], June 2000)
* [https://web.archive.org/web/20100706095225/http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19 Particle Engine Using Triangle Strips] — Jeff Molofee ([[NeHe]])
* [http://archive.gamedev.net/archive/reference/articles/article1982.html Designing an Extensible Particle System using C++ and Templates] — Kent Lai (GameDev.net)