A particle system is a technique in
game physics
Computer animation physics or game physics are laws of physics as they are defined within a simulation or video game, and the programming logic used to implement these laws. Game physics vary greatly in their degree of similarity to real-world phy ...
,
motion graphics
Motion graphics (sometimes mograph) are pieces of animation or digital footage which create the illusion of motion or rotation, and are usually combined with audio for use in multimedia projects. Motion graphics are usually displayed via elec ...
, and
computer graphics
Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
that uses many minute
sprites,
3D models, or other graphic objects to simulate certain kinds of "fuzzy" phenomena, which are otherwise very hard to reproduce with conventional rendering techniques – usually highly
chaotic
Chaotic was originally a Danish trading card game. It expanded to an online game in America which then became a television program based on the game. The program was able to be seen on 4Kids TV (Fox affiliates, nationwide), Jetix, The CW4Kid ...
systems, natural phenomena, or processes caused by chemical reactions.
Introduced in the 1982 film ''
Star Trek II: The Wrath of Khan'' for the fictional "Genesis effect",
other examples include replicating the phenomena of
fire
Fire is the rapid oxidation of a material (the fuel) in the exothermic chemical process of combustion, releasing heat, light, and various reaction Product (chemistry), products.
At a certain point in the combustion reaction, called the ignition ...
,
explosions,
smoke
Smoke is a suspension of airborne particulates and gases emitted when a material undergoes combustion or pyrolysis, together with the quantity of air that is entrained or otherwise mixed into the mass. It is commonly an unwanted by-produc ...
, moving water (such as a waterfall),
spark
Spark commonly refers to:
* Spark (fire), a small glowing particle or ember
* Electric spark, a form of electrical discharge
Spark may also refer to:
Places
* Spark Point, a rocky point in the South Shetland Islands
People
* Spark (surname)
* ...
s, falling leaves, rock falls,
cloud
In meteorology, a cloud is an aerosol consisting of a visible mass of miniature liquid droplets, frozen crystals, or other particles suspended in the atmosphere of a planetary body or similar space. Water or various other chemicals may co ...
s,
fog,
snow
Snow comprises individual ice crystals that grow while suspended in the atmosphere—usually within clouds—and then fall, accumulating on the ground where they undergo further changes.
It consists of frozen crystalline water throughout ...
,
dust
Dust is made of fine particles of solid matter. On Earth, it generally consists of particles in the atmosphere that come from various sources such as soil lifted by wind (an aeolian process), volcanic eruptions, and pollution. Dust in ho ...
,
meteor
A meteoroid () is a small rocky or metallic body in outer space.
Meteoroids are defined as objects significantly smaller than asteroids, ranging in size from grains to objects up to a meter wide. Objects smaller than this are classified as mi ...
tails, stars and galaxies, or abstract visual effects like glowing trails,
magic spell
An incantation, a spell, a charm, an enchantment or a bewitchery, is a magical formula intended to trigger a magical effect on a person or objects. The formula can be spoken, sung or chanted. An incantation can also be performed during ceremo ...
s, 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
strand
Strand may refer to:
Topography
*The flat area of land bordering a body of water, a:
** Beach
** Shoreline
* Strand swamp, a type of swamp habitat in Florida
Places Africa
* Strand, Western Cape, a seaside town in South Africa
* Strand Street ...
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, guiding 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
In mathematics, a dynamical system is a system in which a Function (mathematics), function describes the time dependence of a Point (geometry), point in an ambient space. Examples include the mathematical models that describe the swinging of a ...
and
fluid mechanics
Fluid mechanics is the branch of physics concerned with the mechanics of fluids ( liquids, gases, and plasmas) and the forces on them.
It has applications in a wide range of disciplines, including mechanical, aerospace, civil, chemical and ...
with that are difficult to represent with
affine transformations
In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.
More generally, ...
.
Typical implementation
Particle systems typically implement the following modules:
* An emission stage, which provides a location and generates new particles.
* A simulation stage, which update parameters and simulates how particles evolve.
* A rendering stage, which specifies how to render a particle.
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
normal Normal(s) or The Normal(s) may refer to:
Film and television
* ''Normal'' (2003 film), starring Jessica Lange and Tom Wilkinson
* ''Normal'' (2007 film), starring Carrie-Anne Moss, Kevin Zegers, Callum Keith Rennie, and Andrew Airlie
* ''Norma ...
to the individual face(s) of the object, making the particles appear to "spray" directly from each face but this is optional.
Simulation stage
During the simulation stage, the number of new particles that must be created is calculated based on spawning rates and the interval between updates, and each of them is spawned in a specific position in 3D space based on the emitter's position and the spawning area specified. Each of the particle's parameters (i.e. velocity, color, etc.) is initialized according to the emitter's parameters. At each update, all existing particles are checked to see if they have exceeded their lifetime, in which case they are removed from the simulation. Otherwise, the particles' position and other characteristics are advanced based on a physical simulation, which can be as simple as
translating
Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. The English language draws a terminological distinction (which does not exist in every language) between ''transl ...
their current position, or as complicated as performing physically accurate trajectory calculations which take into account external forces (gravity, friction, wind, etc.). It is common to perform
collision detection
Collision detection is the computational problem of detecting the intersection of two or more objects. Collision detection is a classic issue of computational geometry and has applications in various computing fields, primarily in computer grap ...
between particles and specified 3D objects in the scene to make the particles bounce off of or otherwise interact with obstacles in the environment. Collisions between particles are rarely used, as they are computationally expensive and not visually relevant for most simulations.
Rendering stage
After the update is complete, each particle is rendered, usually in the form of a
textured billboarded 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 computer graphics, metaballs are organic-looking ''n''-dimensional isosurfaces, characterised by their ability to meld together when in close proximity to create single, contiguous objects.
In solid modelling, polygon meshes are commonly ...
in off-line rendering;
isosurface
An isosurface is a three-dimensional analog of an isoline. It is a surface that represents points of a constant value (e.g. pressure, temperature, velocity, density) within a volume of space; in other words, it is a level set of a continuous f ...
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.
Particle System Taxonomy
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 out
Fade out, Fade-out or Fadeout may refer to:
Technical engineering
* Fade-out or fade, a gradual decrease in sound volume
* Fade (lighting) or fade-out, a gradual decrease in intensity of a stage lighting source
* Dissolve (filmmaking) or fade-o ...
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
The field of view (FoV) is the extent of the observable world that is seen at any given moment. In the case of optical instruments or sensors it is a solid angle through which a detector is sensitive to electromagnetic radiation.
Human ...
.
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
Texture mapping is a method for mapping a texture on a computer-generated graphic. Texture here can be high frequency detail, surface texture, or color.
History
The original technique was pioneered by Edwin Catmull in 1974.
Texture mappi ...
to vary the strands' color, length, or other properties across the emitter surface.
In 1987, Reynolds introduces notions of
flocking,
herding
Herding is the act of bringing individual animals together into a group (herd), maintaining the group, and moving the group from place to place—or any combination of those. Herding can refer either to the process of animals forming herds in ...
or
schooling
A school is an educational institution designed to provide learning spaces and learning environments for the teaching of students under the direction of teachers. Most countries have systems of formal education, which is sometimes compuls ...
behaviors. The
boids model extends particle simulation to include external state interactions including goal seeking, collision avoidance, flock centering, and limited perception.
In 2003, Müller extended particle systems to
fluidics
Fluidics, or fluidic logic, is the use of a fluid to perform analog or digital operations similar to those performed with electronics.
The physical basis of fluidics is pneumatics and hydraulics, based on the theoretical foundation of fluid dyna ...
by simulating
viscosity
The viscosity of a fluid is a measure of its resistance to deformation at a given rate. For liquids, it corresponds to the informal concept of "thickness": for example, syrup has a higher viscosity than water.
Viscosity quantifies the inte ...
,
pressure
Pressure (symbol: ''p'' or ''P'') is the force applied perpendicular to the surface of an object per unit area over which that force is distributed. Gauge pressure (also spelled ''gage'' pressure)The preferred spelling varies by country and e ...
and
surface tension, and then rendered surfaces by interpolating the discrete positions with
Smoothed Particle Hydrodynamics
Smoothed-particle hydrodynamics (SPH) is a computational method used for simulating the mechanics of continuum media, such as solid mechanics and fluid flows. It was developed by Gingold and Monaghan and Lucy in 1977, initially for astrophysic ...
.
{{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 provides multiple particle system APIs. Their Havok FX API focuses especially on particle system effects.
Ageia
Ageia, founded in 2002, was a fabless semiconductor company. In 2004, Ageia acquired NovodeX, the company who created PhysX – a Physics Processing Unit chip capable of performing game physics calculations much faster than general purpose CPUs ...
- now a subsidiary of
Nvidia
Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
- provides a particle system and other game physics API that is used in many games, including
Unreal Engine 3 games. Both
GameMaker Studio
GameMaker (originally Animo, Game Maker ''(until 2011)'' and GameMaker Studio) is a series of cross-platform game engines created by Mark Overmars in 1999 and developed by YoYo Games since 2007. The latest iteration of ''GameMaker'' released ...
and
Unity
Unity may refer to:
Buildings
* Unity Building, Oregon, Illinois, US; a historic building
* Unity Building (Chicago), Illinois, US; a skyscraper
* Unity Buildings, Liverpool, UK; two buildings in England
* Unity Chapel, Wyoming, Wisconsin, US; a h ...
provide a two-dimensional particle system often used by
indie
Indie is a short form of "independence" or "independent"; it may refer to:
Arts, entertainment, and media
Gaming
*Independent video game development, video games created without financial backing from large companies
*Indie game, any game (board ...
, 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
*
N-body simulation
In physics and astronomy, an ''N''-body simulation is a simulation of a dynamical system of particles, usually under the influence of physical forces, such as gravity (see n-body problem, ''n''-body problem for other applications). ''N''-body ...
*
Particle method
In the field of numerical analysis, particle methods discretize fluid into particles. Particle methods enable the simulation of some otherwise difficult types of problems, at the cost of extra computing time and programming effort.
Some of parti ...
References
External links
The ocean spray in your face.—
Jeff Lander (Graphic Content, July 1998)
Building an Advanced Particle System— John van der Burg (
Gamasutra
''Game Developer'', known as ''Gamasutra'' until 2021, is a website founded in 1997 that focuses on aspects of video game development. It is owned and operated by Informa and acts as the online sister publication to the print magazine '' Gam ...
, June 2000)
Particle Engine Using Triangle Strips— Jeff Molofee (
NeHe
Nehe () is a county-level city of western Heilongjiang in Northeast China, It is located near the border with Inner Mongolia to the west and is under the administration of Qiqihar City, to the north-northeast.
Administrative divisions
Nehe C ...
)
Designing an Extensible Particle System using C++ and Templates— Kent Lai (GameDev.net)
repository of public 3D particle scripts in LSL Second Life format - Ferd Frederix
GPU-Particlesystems using WebGL- Particle effects directly in the browser using WebGL for calculations.
3D computer graphics
Computer physics engines
Virtual reality