shown in other instead.
A particle system is a really versatile technique that consists in creating complex moving structures that produce dynamic and "fuzzy" effects. They are used for simulation of abstract effects of fire, smoke, explosions, magic, electricity, fountains, rocket trails, flocking, and many many more. All of these are hard to reproduce using traditional rigid objects: particles are not represented by a set of primitive surface elements, but by point masses forming the particles primitives volume. Another distinctive feature is that particles are not static, they alter not only their position, but can also change their form with the time.
A particles system simulation involves tree main entities:
Finely adjusted particles can make the scene look more attractive, vivid and dynamic by creating a spouting and blowing apart systems, or contrariwise soft disappearing particle flow. Color and refraction changes grant both their accurate physical modelling and representational refinement (for more detailed information see particles_base material).
Types of Particles
However wide the range of effects simulated by particles is, geometrically they are represented by the following types used for rendering:
- Billboard particles are by far the most usable type. They represent square planes, that always face the camera and their vertices are randomly oriented. To give an example, billboard particles can be used to create smoke.
- Flat particles are parallel to each other and perpendicular to the Z-axis of their particle system. They are good for simulating some effects on the plane surfaces like water.
- Point particles are similar to the billboard type. They also always face the camera, but have fixed screen-aligned orientation.
- Length are billboard particles that are stretched along the direction of their movement. The stretching is adjustable factor. Sparks and splashes can be effectively simulated using this type.
- Random are square particles randomly oriented in the space. The leaf fall can be successfully imitated with this type of particles.
- Chain are billboard particles that stick to each other forming a continuous, visually uninterrupted flow. Their length directly depends on the spawn rate of the emitter. This type of particles is intended to be used with shift emitter creating a chain-like trail after it.
Stretch of the Length Particles
The size of the length particles is not preset, their length can vary to some extent:
- With the value of 0, the length particles are simply square.
- Increasing the value stretches the particles in the direction of their movement. The result is calculated by multiplying the stretch value by the particle velocity value. So, the higher the velocity is, the more stretched in the direction of their movement the particles are, while the other side remains of the same width.
The nature is diverse, so the viewer anticipates the same from the simulated phenomenon. It goes without saying, that drawing particles variants by hand is tiresome and ineffective as usually they are small enough and plentiful to be inspected closely and thoroughly. However, instinctively the flow of uniform particles is still deemed unnatural.
If variation option is enabled, the particles monotony will be relieved: they will randomly take one of the four possible orientations of the assigned texture. Imagine this texture rotating 90 degrees clockwise — that gives four variations used for rendering varied particles. Usually it is enough for the eye to perceive the flow as natural.
Particles Interaction Calculations
Interaction of the particles is confined to the application of forces and collisions with external objects. With the latter, there are two methods of detection are possible. Particle-particle collisions are not checked as collision detection is an expensive operation.
Intersection stands for calculating collision of the mesh only with the particle center, not the whole particle shape. Intersection may look a bit unnatural as physical reaction starts only when half of the particle has already penetrated the mesh, but it is perfectly suitable if there are a lot of small particles. The main advantage of this method is its fastness and cheapness performance-wise.
Collision option, unlike the intersection, suggests detecting whether the whole particle shape has collided with the mesh. If the particles are big enough, this is the preferable method, as it provides the higher degree of visual realism: the particles react according to the set settings, when their edge or vertex comes in contact with the objects. Collision calculations are more expensive, so big particles systems should use this option carefully.
Interaction with Physical Nodes
Besides being thoroughly physical from the point of view of internal simulation (simulation parameters are dwelt below), the particles can also accurately interact with the environment through physical nodes: wind, force and water.
Particles Physical Mass
To participate in the scene dynamics, the particles should have a certain mass in kilograms. Its value gives a notion, how strong the physical nodes will influence the particles flow. As concerns other internal simulation calculations, the mass does not affect them.
- With the mass of 0, the trajectory of particle system is not influenced by the external forces.
- The higher the mass, the heavier the particles are, and the less the physical nodes can decline their flow, stretch them or otherwise affect.
For the more selective interaction of the particles systems with the physical nodes, bit mask is used, that is set for both the particles and the force. These masks should have at least one bit matching, or otherwise no influence will be effected. The other bits of the mask can match with the other forces, thus providing perfect control over the scene integration.
Particles Node Hierarchy
To create the complex effects, it is necessary that all the particles systems are synchronized in time. Setting a particle system as a parent node will result in the following:
- All the particles systems, that are the child nodes, will be synchronised relative to the parent one. If the children have the children of their own, they will still be synchronised to the main parent system highest in the hierarchy.
- When creating a new child particle system, it should be synchronized to the parent one by disabling and again enabling the parent emitter (Parameters tab -> Enabled box). At this moment of time each of the child systems is initialized with its simulation parameters (such as generation duration, period of generation pause, and delay of initialization).
- Disabling or enabling the parent emitter (Parameters tab -> Enabled box) affects all the child particle systems: they will be automatically and synchronously stop or start emitting particles (the existing particles will still live out their time).
- Disabling or enabling the parent node (Node tab -> Enabled box) also affects all the children: all the particle systems in the hierarchy are turned off and on — and appear in the same state as they were at the moment of their disabling.
Delay of Initialization
Delay option extents the synchronization scope for the particle systems. It defines the time to pass between the parent system initialization and initialization of the child node. So at first the parent system starts to emit the particles, and only after the delay pause the generation of the child particles is activated. The delay can be set with some extent of randomization.
- With the mean and spread value of 0, the parent and child systems are initialized synchronously.
- With higher mean value, the initialization of child particle system will be delayed relative to the parent one for the strictly defined time period.
- Providing spread value allows to define the range for randomization of the delay pause.
The options described below determine particles system rendering specifics, that allow to achieve an agreement between the concept and concrete implementation in the created virtual world.
The particle system evolve with time, so after encountering it in the virtual world, the system only starts to be generated, particle by particle, until the whole system gains the intended look. When the character comes out on the glade, we will see the fire gradually burn up. Warm start for the particles enables rendering the full-grown particle system straight away.
The technical realization of warm start is the following: when the particle system is initialized on encountering, its life is computed starting from the generation of first particle to its disappearance. After that, the particle system is considered evolved and is rendered in this state. The calculations are taken at a fixed frame rate of 25 fps, which is the minimum required for correct simulation of particle systems (see also information about correlation between framerates).
Warm start can be enabled without any detrimental effect for any particles systems, except for huge ones.
Depth sorting is required, if particles use alpha blending. If not enabled, then basing on the depth buffer data, further positioned opaque objects can be wrongly rendered over the top of transparent particles. With depth sorting, geometry will be rendered in the order from back to front, which rules out visual artifacts.
Three visibility options are analogous to the level of detail of the ordinary objects, but better suited for the fine and elusive nature of the particles. They allow to flexibly define how the system will fade out of sight, when the camera moves away from it and there is no more necessity to calculate it to the full.
The particle system is rendered in its originally designed state, determined by the set parameters, up to the visible distance. The reference point to measure distance from is the camera.
- If set to infinity (inf), there will no distant-dependent optimization applied and the particles system will be always rendered.
After the visible distance is past, the particles starts to gradually fade away. At this range the flow imitates natural loss of detalization by thinning, intensity of which depends on the fade attenuation parameter. After passing the fade distance limit, particles are not rendered at all.
Fade attenuation allows to modulate how smooth the fading will be. From the mathematical point of view, this parameter defines the exponent of the function.
- The default 2 allows the particle system to disappear from sight in a most nonirritating and unnoticeable manner.
- The smaller the value is, the more particles will remain when moving the fade distance limit.
- The bigger the value is, the more particles will disappear shortly after passing the visible distance.
- If the value is set to 0, the particle system will not fade gradually. Instead, it will be rendered in full throughout all the fade distance and abruptly disappear after passing it.
When creating a particle system in the 3D world, it should originate somewhere. Emitter is the very object that serves a source for generating particles. To embrace the diversity of modelling effects, it is essential not only the particles should be overviewed, but also the emitter as it plays an important role in the system visual and physical representation.
Types of Emitters
The emitter type define the shape of the volume within which the particles are generated:
- Point — particles are emitted from a single point.
- Sphere — particles are generated in a random point within a sphere, that has a certain radius.
- Cylinder — particles are generated in a random point within a cylinder, that has specified radius and height.
- Box — particles are generated in a random point within a cube, that has parameters of width (X axis), height (Y axis), and depth (Z axis).
- Random — if the random emitter is chosen, the particles are generated on surface of the arbitrary mesh or over the particles surface. To make it happen, the object emitting particles should be set as a parent node with the particle system as a child one. At rendering time, the random vertices of the mesh will be chosen to generate the particles.
- Spark — this emitter generates particles in the conditioned points. It can be used to create particles that are able to spawn new particles themselves: when the first particles collide with the ground, in the point of collision new spark particles are born. In this case, the spark particle system should be made a child node of the parent first particles. Spark emitter can be used to simulate cascades of particles as, for example, solutes.
- Shift — the particles are generated only when the system is moving. Particles can be shifted after the parent node (need to be assigned as a child), or their movement can be defined programmatically. With shift emitter it is possible to create a foam trail from on the water from the boat or rocket trails.
The size of the area for generating particles can be adjusted — stretched or contracted to fit the definite scene location. The exact size parameters (whether it is radius or boundary dimensions) depend on the chosen type.
Limit per Frame
The maximum number of particles that emitter can spawn during one frame is controlled via emitter limit. This parameter allows to specify the exact number of particles to be emitted at once if emission Duration value is set to 0 (one-frame emission). In other cases, when particles are emitted constantly during some time period (non-zero Duration), it is used to avoid the performance drop in general.
This parameter allows to set the order of rendering for particle systems, especially when creating a complex effects like shots (with muzzle flash, smoke and the shot itself, each rendered with different particle systems). This parameter is very much the same as Order option in the Materials. But it allows to set a rendering sequence inside of the particle system hierarchy, to avoid such situations when the smoke from a distant shot is rendered atop of the the fire of the foreground shot.
- 0 means a default sorting according to bounding boxes of particle systems.
- Particles with the lowest Sequence number are rendered first and are covered by the particles with the highest Sequence number, which are rendered last and above others.
It is the precise mechanics of particles behaviour that helps to simulate a wide variety of effects. Guided by the set of parameters mentioned below, the effects can acquire the desired motion and be perceived as dynamically correct.
However, procedural modeling, that is wholly and strictly determined, does not create the unique systems. So to circumvent the issue, stohastic methods appear on stage. Stochastic processes introduce some degree of randomness, allowing the deviations of the resulting value within a specified range. As a result, it gives the particles system shape and appearance the natural-looking freedom of change. For example, not all the particles in the flow will move with identical speed: some will move faster, some slower, imitating complex interactions.
From the point of view of realisation, the simulation parameters (those that require it) are not specified by one value, but by two:
- Mean value defines the average value. With its help the designer can set a setting milestones to control the parameter.
- Spread value defines the range for possible variation. The higher the value, the more diversely the particles will behave.
Spread value is optional: if set to 0, it will not influence the simulation process and only the mean value will be used.
After these values are specified, the following formula is used to calculate the final result for the parameter:
The size of the particles that form the system, rendered in the virtual environment, depends solely on the simulated physical phenomenon. It is specified as radius of the particle (for the particles of length type, the size is also influenced by the stretch factor). To enliven the visual monotony, the generated flow of particles can be variegated to the extent limited by the spread value of the parameter.
When the particle is generated, its orientation in the space can be defined by the specific angle. This parameter allows to create particles systems of richer structure and higher visual complexity, by specifying mean and spread values.
- If the angle spread value is set to 180 degrees, the particles will be randomly oriented in all directions.
If particles are enabled (Enabled checkbox is flagged), the emitter starts to create them with the specified rate. This parameter defines whether the particles system will be a gushing fountain or episodic sparkles.
- The value defines how many particles are generated in one second. For example, the value set to 5 equals spawning 5 particles per second.
- 0 results no particles at all.
- For shift emitters, the spawn rate correlates to generating the specified number of particles when emitter shifts one unit.
Let's say we have set the Spawn rate to 1 particle per second and Duration of emission to be less then one second, as well as any non-infinite value for the generation Period (for emission to be iterative rather than one-time one). Once the emitter is enabled, it counts off Duration intervals (the Period time is ignored) and when they make in sum 1 second, a particle is spawned. If the Spawn rate is set to 2 particles, they are simulated somewhere throughout this accumulated one-second period.
The way to calculate what spawn rate to set is basically as follows. If you set the Duration emission to 0.1 second and want to 1-3 particles to be spawned, set the Spawn rate to 10-15 particles. Particle system depend on the FPS and thus if set strictly to 10 particles, you may end up in a situation when no particle is spawned during one Duration interval (because due to the varied FPS the necessary Duration time did not accumulate enough). Increasing the Spawn rate to 15 particles will allow to be on the safe side.
The number of particles spawned by spark and random emitters can be additionally synchronized to the parent particle system. This parameter allows to regulate the number of particles depending on the velocity of the parent particles.
- By the value of 0, the spawn rate of the spark emitter is independent of the parent particle system.
- The higher the threshold value, the higher must be velocity of the parent particles for the sparks to be generated. If it is not high enough, there will be only few particles, if any.
The emitter can generate particles not only constantly, but also in intervals. Duration parameter controls the time period, during which emission occurs. Small values can add gushing quality to the particle flow. Jerking motion can also serve to simulate effects of impulse nature.
- The higher the value, the longer are the periods when particles are generated.
- Setting the Duration to 0 means that particles are spawned over an infinitely small time interval, that is, only during one frame, simultaneously. This value can be used when you need to simulate a one-particle gun shot, for example. The exact number of particles to be emitted at once is controlled via the Limit parameter. (Set the Spawn rate very high in order to generate particles in this case).
As it was already said, the cycles can not only be set strictly. They can vary in duration, as this parameter is defined by mean and spread values. Suppose, we set a mean value to 2 and a spread value to 1. In this case, some generation intervals will last for 2 seconds, some for 3 and some for 1, interchanging in the random order.
Period of Generation Pause
After the generation cycle is over, the emitter can make a pause, duration of which is defined by this parameter:
- If the mean value is set to 0, the particles are spawned constantly, without any pauses.
- If infinity (inf) is specified, the particles emitter becomes inactive after one generation cycle.
After the particle is emitted, it exist in the virtual world for the specified time before disappearing (unless it disappears earlier due the clipping). This parameter also has mean and spread values, that allow the particles flow to form a convincingly disappearing tail with changing density.
Direction of Emission
Emitters directly influence characteristics and specifics of particle system behavior, contributing to the physical simulation algorithm. They determine the direction in which all the emitted particles move forming a flow.
- Emitting direction is specified along the X, Y and Z axes. The values are relative to each other, which means the particles flow is deflected in the direction with greater value.
- Negative values force the particles to move in the inverse direction of the axes.
If a Random emitter is used to generate particles on the mesh surface, it is possible to make the emitted particles move in the direction of the surface normal. For that, you need to set the following:
- Direction values to 1, 1, 1.
- Spread values to 0, 0, 0.
Spread of Emission
Shaping the particles flow allows to create different spawning models of the particles. Spread option introduces additional angular modulation of the emission direction. It represents the same spread values, that randomly vary direction of the emitted particles within the set limits.
- Spread controls the scattering of the particles along the X, Y and Z axes. The values are also relative to each other and the direction values.
- The higher the value, the wider the particles are scattered. If no direction values are specified, the scattering occurs in both the positive and the negative axis directions.
For example, to create the particles flow that is spread downwards and forms a 90 degree cone, the following values could be set:
- Direction: 0, 0, -10. This will provide the overall movement down the Z axis. The same is achieved with the positive value after the particle system is rotated.
- Spread: 10, 10, 0. The particles will be spread evenly along both the X and Y axes, scattering at an angle of 90 degrees and forming a cone.
To modulate the emission in the form of ellipse the following values could be set:
- Direction is of the same values: 0, 0, -10.
- Spread: 10, 3, 0.
- For the ellipse to be more rounded, the spread value along the Y value should be changed from 2 to, let's say, 6.
- The higher the mean value is, the faster the particles movement becomes.
- Negative mean values set the particles movement in the opposite direction to the set one.
- If the spread value is higher than the mean velocity value, the particles will move in two directions: the main flow in the specified direction, and some particles in the opposite one. To avoid it, the spread value should be less than or equal to the mean velocity value.
Particle velocity can be altered by the additional external force of gravity. With this parameter the particle direction can be interfered with, diverting the flow along the X, Y and Z axes.
- Positive values equal gravity vector directed upwards.
- Negative values equal gravity vector directed downwards.
Linear damping dictates the decrease in particles linear velocity with the time and is used to simulate effect of the medium friction on particles.
- If the value is set to 0, the propagation of particles is not hindered and the velocity remains the same throughout all the particle life.
- The higher the number is, the faster the particles velocity decreases with the time until it stops completely.
The linear movement does not exhaust the particles behavioristic possibilities. Starting from the initial orientation angle, particles can spin around their own axis. Rotation parameter determines the angular velocity of their spinning motion. Imagine, for example, leaves whirl around as they fall.
- Positive numbers rotate the particles clockwise.
- Negative numbers rotate the particles counterclockwise.
Angular damping is responsible for the gradual decrease of particle rotation.
- If 0 value is set, the particles will consistently rotate throughout all of their life.
- The higher the number is, the faster the velocity of particles rotation diminishes, until they become completely nonspinning.
Even with the diversity offered by the particles radius range, it can be not enough to reproduce the desired dynamics. The growth parameter introduces particle that change their initial size with the time. The growth can be either defined strictly (only mean value) or approximated with the range (by specifying also a spread value).
- Positive numbers result in particles increasingly growing after they are spawned. To see how it works, imagine the fireworks grow and blossom in the sky.
- Negative number define the particles gradually lessening, so the particles tail dwindles, for example, to imitate the smoke dissipating in air.
For the growth not to be uncontrollable, it is regulated by the Growth Damping parameter. It defines the gradual decrease in the particles enlargement in size with the time. To name an example, this parameter allows to conveniently simulate explosion effects: in the begining the particles grow rapidly, while afterwards their growth slows down.
- The value of 0 means the particles will be constantly increasing in size throughout all of their life time.
- The higher the value is, the faster the growth of particles stops and they live out with the constant size.
When particles contact any object (it should have collision or interaction detection enabled), they can react in one of the ways described below.
Sometimes computing the life of each particle up to its natural disappearance can be unnecessary, because of their vanishing from sight, for instance. It especially holds true with simulation of big particle system. Clipping option determines that when a particle hits the obstacle, it vanishes and does not continue to be simulated, meaning no further bouncing off or scattering occurs. This option is quite useful if seeking to raise the frame rate.
After hitting the obstacle (if particles are not clipped), they can bounce off the surface rather than slipping along it. This option is very convenient if simulating some watter effects that include splashes. The vigorousness of bouncing depends both on the restitution parameter of the particles and the restitution surface option for the colliding object (Properties -> Parameters tab -> Restitution).
- With the minimum value of 0, the particles does not bounce off.
- With the maximum value of 1, the angle of particles fall equals the angle of their bouncing off. This means the particles will bounce as high, as the physical fidelity allows.
Another characteristic of the particles, showing up on their contact with the obstacle, is the roughness of their surface. It determines whether the particles scatter in different directions or react as a uniformly directed flow.
- The minimum value of 0 means the trajectory of all particles after the collision is the same.
- The maximum value of 1 means the particles will scatter in different directions and a bit angularly. This angle arising from particle roughness also affects bouncing behaviour.
Synchronizing Several Particle Systems
To synchronize several particle systems, for example, to create a shot effect (with three particle systems: muzzle flash, smoke and the bullet), you can do the following:
- Create the parent particle system that will be used as a dummy one, purely for synchronization purposes (you can even disable its surface). Its Duration time interval should cover all duration intervals and delay intervals (if any) of the children particle systems. Other parameters (Spawn rate, etc.) do not matter.
- Add the child particle systems. They can have any Duration time necessary (but it should be smaller than the one of the parent). For example, to synchronize all child particle systems at once and to spawn only one particle, you can set the following:
More intricate changes in further movement of the particles may be performed by applying the forces. They direct the particles flow in the desired direction or on the contrary deflect it. The forces can be of two general types:
Point forces represent a force concentrated in a point, application of which is limited by the sphere. The point force sphere can be placed anywhere in the scene and rotated, if necessary. However, for the point force to affect the particles movement, it should include them in its radius.
Besides that, point force has two main properties, that define its influence.
Attractor property allows to correct the linear direction of particles movement.
- If positive value is provided, the particles are repelled and move away from the force center point.
- If negative value is provided, all the particles are attracted to move in the direction of the force center point.
- By 0 value, the property is inactive and does not effect particles movement.
With Rotator property, the particles are spinned around the force center point.
- Positive values spin the particles in the clockwise direction.
- Negative values spin the particles counterclockwise.
- By 0 value, the property is inactive and does not effect particles movement.
Point Force Attenuation
To get more plausible visual result, especially by applying a set of different forces, their influence on the particles can gradually decrease when moving to the boundary.
- 0 equals no attenuation and the force's influence ceases abruptly when crossing the sphere boundary.
- The higher the attenuation value is, the closer to the force center point starts to weaken.
Deflector is a surface field that has no visual representation, but physically interacts with the particle system (no other objects are influenced, of course). Depending on the specified size, it can be either rectangular or square, plus arbitrarily positioned or rotated to cover the necessary area.
Deflectors are one-sided, meaning the particles can freely penetrate them through one side, and interact only with the opposite one, for example, when having fallen on it from above.
Deflectors can be of two types:
Reflector represents an invisible surface aimed for providing additional bouncing off and scattering of the particles.
The restitution of the deflector is based on the same principle as the particles general restitution. After hitting the deflector surface, particles bounce off it at the angle, defined by set value:
- The minimum value of 0 means the particles does not bounce off, but rather slide along deflector surface.
- The maximum value of 1 proves the angle of bouncing that equals the angle of particles fall.
Deflector roughness is also similar to the roughness characteristic of the particles. It simulates unevenness of the surface that results in particles scattering in different directions when hitting it.
- The minimum value of 0 means the surface is smooth and the particles are scattered in a uniform direction.
- The maximum value of 1 means the surface is harsh and the particles will scatter differently and angularly.
Clipper is a surface field that clips all the particles it comes in contacts with. If the particle system is accidentally dispersed into the unnecessary area, it can be clipped simply and trouble-free by adding a clipper, that does not render, without exerting additional effort of readjusting the whole particle system.
It is possible to create mesh-based particle systems. For that, Mesh Cluster need to be added as a child node of ObjectParticles. After that, meshes are automatically spawned by the emitter. (Clear Nodes → Surfaces → Material for particles if you do not want to spawn them together with meshes.)