From BlenderWiki
If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.
If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)
The movement of particles may be controlled in a multitude of ways:
- With particles physics: there are four different systems:
- None: It doesn’t give the particles any motion, which makes them belong to no physics system.
- Newtonian: Movement according to physical laws.
- Keyed: Dynamic or static particles where the (animated) targets are other particle systems.
- Boids: Particles with limited artificial intelligence, including behavior and rules programming, ideal for flocks of birds or schools of fishes, or predators vs preys simulations.
- By softbody animation (only for Hair particle systems).
- By forcefields and along curves.
- By lattices.
Here we will discuss only the particle physics in the narrower sense, i.e. the settings in the Physics panel.
[edit] Physics: None
At first a Physics type that makes the particles do nothing could seem a bit strange, but it can be very useful at times. None physics make the particles stick to their emitter their whole life time. The initial velocities here are for example used to give a velocity to particles that are effected (or affected?) by a harmonic effector with this physics type when the effect of the effector ends.
Moreover, it can be very convenient to have particles at disposal (whose both Unborn and Died are visible on render) to groom vegetation and/or ecosystems using Object, Group or Billboard types of visualization.
[edit] Physics: Newtonian
These are the “normal” particle physics. Particles start their life with the specified initial velocities and angular velocities, and move according to forces. The response to environment and to forces is computed differently, according to any given integrator chosen by the animator.
[edit] Integrators
Integrators are a set of mathematical methods available to calculate the movement of particles. The following guidelines will help to choose a proper integrator, according to the behavior aimed at by the animator.
- Euler: Also known as “Forward Euler”. Simplest integrator. Very fast but also with less exact results. If no dampening is used, particles get more and more energy over time. For example, bouncing particles will bounce higher and higher each time. Should not be confused with “Backward Euler” (not implemented) which has the opposite feature, energies decrease over time, even with no dampening. Use this integrator for short simulations or simulations with a lot of dampening where speedy calculations is more important than accuracy.
- Midpoint: Also known as “2nd order Runge-Kutta”. Slower than Euler but much more stable. If the acceleration is constant (no drag for example), it is energy conservative. It should be noted that in example of the bouncing particles, the particles might bounce higher than they started once in a while, but this is not a trend. This integrator is a generally good integrator for use in most cases.
- RK4: Short for “4th order Runge-Kutta”. Similar to Midpoint but slower and in most cases more accurate. It is energy conservative even if the acceleration is not constant. Only needed in complex simulations where Midpoint is found not to be accurate enough.
[edit] Initial velocity
The initial velocity of particles can be set through different parameters, based on the type of the particle system (see Particle System tab). If the particle system type is Emitter or Hair, then the following parameters give the particle an initial velocity in the direction of…
- Object: …the emitter objects movement (i.e. let the object give the particle a starting speed).
- Normal: …the emitter’s surface normals (i.e. let the surface normal give the particle a starting speed).
- Random: …a random vector (i.e. give the starting speed a random variation in direction and in value. You can use a texture to only change the value, see Controlling Emission, Interaction and Time).
- Tan & Rot: …a tangential vector along the surface, rotated by Rot.
- Tan: Let the tangent speed give the particle a starting speed.
- Rot: Rotates the surface tangent.
If the particle system type is Reactor, then the following parameters give the particle an initial velocity in the direction of…
- Particle: …the target particles velocity (i.e. let the target particle give the particle a starting speed).
- Reactor: …a vector away from the target particles location at the time of the reaction (i.e. let the vector away from the target particles location give the particle a starting speed).
[edit] Rotation
These parameters specify how the individual particles are rotated during their travel. To visualize the rotation of a particle you should choose visualization type Axis in the Visualization panel and increase the Draw Size.
- Dynamic: If enabled, only initializes particles to the wanted rotation and angular velocity and let’s physics handle the rest. Particles then change their angular velocity if they collide with other objects (like in the real world due to friction between the colliding surfaces). Otherwise the angular velocity is predetermined at all times (i.e. set rotation to dynamic/constant).
- Rotation: Sets the initial rotation of the particle by aligning the x-axis in the direction of…
- None: …the global x-axis.
- Normal: …the emitter’s surface normal.
- Velocity: …the particle’s initial velocity.
- Global X/Global Y/Global Z: …one of the global axes.
- Object X/Object Y/Object Z: …one of the emitter object axes.
- Random: Randomizes rotation.
- Phase/Rand: Initial rotation phase, Rand allows a random variation of the Phase.
- Angular v: The magnitude of angular velocity, the dropdown specifies the axis of angular velocity to be…
- None: …a zero vector (no rotation).
- Spin: …the particles velocity vector.
- Random: …a random vector.
If you use a Curve Guide and wan’t the particles to follow the curve, you have to set Angular Velocity to Spin and leave the rotation on Constant (i.e. don’t turn on Dynamic). Curve Follow does not work for particles.
[edit] Global effects
These parameters specify global physical factors that accelerate or decelerate particles velocity. Useful when simulating various phenomenon like gravity, air-drag, friction and such. Other, more complicated or localized forces can be created with Force Fields.
- AccX, AccY and AccZ: An acceleration in the direction of the global axes. Use this to implement gravity by setting AccZ to a negative value, for example.
- Drag: A force that reduces particle velocity in relation to it’s speed and size (useful in order to simulate Air-Drag or Water-Drag).
- Brown: A random force that changes from frame to frame. Simulates Brownian movement which is an effect seen on (very) small particles where forces from individual molecules are unbalanced over time. This is nice to simulate small, random wind forces.
- Damp: Reduces particle velocity (deceleration, friction, dampening).
[edit] Physics: Keyed
The particle paths of keyed particles are determined from the emitter to another particle system’s particles. This allows creation of chains of systems with keyed physics to create long strands or groovy moving particles. Basically the particles have no dynamics but are interpolated from one system to the next at drawtime.
Because you have so much control over these kind of systems, you may use it e.g. for machines handling fibers (animation of a loom, …). In (Image 3), the strands flow from the bottom system (First keyed) to the second keyed system in the middle, and from that to the top system that has None-Physics. Since you may animate each emitter object as you like, you can do arbitrarily complex animations.
To setup Keyed particles you need at least two particle systems.
- The first system has keyed physics, and it needs the option First activated. This will be the system thats is visible. *The second system may be another keyed system but without the option First, or a normal particle system. This second system is the target of the keyed system.
- Keyed Target: You have to enter the name of the object which bears the target system and if there are multiple particle systems the number of the system.
If you use only one keyed system the particles will travel in their lifetime from the emitter to the target. A shorter lifetime means faster movement. If you have more than one keyed system in a chain, the lifetime will be split equally. This may lead to varying particle speeds between the targets.
- Timed: This option is only available for the first keyed system. It works together with the Time slider for the other keyed systems in a chain.
- The Time slider allows to define a fraction of particle lifetime for particle movement.
An example: let’s assume that you have two keyed systems in a chain and a third system as target. The particle lifetime of the first system shall be 50 keys. The particles will travel in 25 frames from the first keyed system to the second, and in further 25 frames from the second system to the target. If you use the Timed button for the first system, the Time slider appears in the second systems panel. It’s default value is 0.5, so the time is equally split between the systems. If you set Time to 1, the movement from the first system to the second will get all the lifetime (the particles will die at the second system).
If you set Time to 0 the particles will start at the second system and travel to the target.
[edit] Physics: Boids
Boids particle systems can be set to follow basic rules and behaviors. They are useful for simulating flocks, swarms, herds and schools of various kind of animals, insects and fishes. They can react on the presence of other objects and on the members of their own system. Boids can handle only a certain amount of information, therefore the sequence of the Behaviour settings is very important. In certain situations only the first three parameter are evaluated.
Boids try to avoid objects with activated Deflection. They try to reach objects with positive Spherical fields, and fly from objects with negative Spherical fields. The objects have to share one common layer to have effect. It is not necessary to render this common layer, so you may use invisible influences.
[edit] Behaviour
- Only a certain amount of information can be evaluated. If the memory capacity is exceeded, the remaining rules are ignored.
- The rules are parsed from top-list to bottom-list (thus giving explicit priorities), and the exact order can be modified using the little arrows in front of each row. The list of rules available are:
- Collision: Avoid objects with activated Deflection.
- Avoid: Avoid “predators” (objects with Spherical fields and negative Strength).
- Crowd: Avoid other boids.
- Center: Get to flock center.
- AvVel: Maintain average velocity.
- Velocity: Match velocity of nearby boids.
- Goal: Seek goal (objects with Spherical fields and positive Strength).
- Level: Keep the Z level. The boids then try to not change their flightlevel. This is deactivated for 2D boids.
Each rule can be individually weighted; the value should be considered how hard the boid will try to respect a given rule (a value of 1.000 means the Boid will always stick to it, a value of 0.000 means it will never). If the boid meets more than one conflicting condition at the same time, it will try to fulfill all the rules according to the respective weight of each. Any rule could be weighted from -1.000 to +2.000 in order to give it more or less significance.
- Normal behavior can be expected with weights between 0.000 to 1.000.
- From 1.000 to 2.000 the boids over react according to the rules.
- From -1.000 to 0.000 the boids react contrary to the rules.
Please note that a given boid will try as much as it can to comply to each of the rules he is given, but it is more than likely that some rule will take precedence on other in some cases. For example, in order to avoid a predator, a boid could probably “forget” about Collision, Crowd and Center rules, meaning that “while panicked” it could well run into obstacles, for example, even if instructed not to, most of the time.
As a final note, the Collision algorithm is still not perfect and in research progress, so you can expect wrong behaviors at some occasion. It is worked on.
[edit] Physics
- MaxVelocity: Maximum velocity.
- AvVelocity: The usual speed percent of max velocity. If MaxVelocity is set to 10.000 and AvVelocity to 0.300, then the average velocity of the boids is 3.000.
- LatAcc: Lateral acceleration percent of max velocity (turn). Defines how fast a boid is able to change direction.
- TanAcc: Tangential acceleration percent of max velocity (forward). Defines how much the boid can suddenly accelerate in order to fulfill a rule.
- Banking: Banking of boids on turns (1.0 == natural banking).
- MaxBank: How much a boid can bank at a single step.
- N: How many neighbours to consider for each boid.
- 2D: Constrains boid to a surface: either to the surface of a given object (if specified in the OB field) or to a certain Z value (GroundZ). Useful to simulate herds on a ground, for example. When activated, Level, Banking and MaxBank become irrelevant.
- GroundZ: Default Z value.
- OB: Object’s surface the boid is constrained to.
- If boids trajectory leads them out of the surface of an object, the GroundZ value is then used. E.g. Boids will distribute on the top half of a sphere and then “drip” to the ground.
[edit] Boids, deflectors and effectors
As mentioned before, very much like Newtonian particles, Boids will react to the surrounding deflectors and fields, according to the needs of the animator:
- Deflection: Boids will try to avoid deflector objects according to the Collision rule’s weight. It works best for convex surfaces (some work needed for concave surfaces).
For boid physics, Spherical fields define the way the objects having the field are seen by others. So a negative Spherical field (on an object or a particle system) will be a predator to all other boids particle systems, and a positive field will be a goal to all other boids particle systems.
When you select an object with a particle system set on, you have in the Fields tab a little menu stating if the field should apply to the emitter object or to the particle system. You have to select the particle system name if you want prey particles to flew away from predator particles.
- Spherical fields: These effectors could be predators (negative Strength) that boids try to avoid or targets (positive Strength) that boids try to reach according to the (respectively) Avoid and Goal rules’ weights. Spherical’s effective Strength is multiplied by the actual relevant weight (e.g. if either Strength or Goal is null, then a flock of boids won’t track a positive Spherical field).
You can also activate Die on hit (Extras panel) so that a prey particle simply disappears when “attacked” by a predator particle which reaches it. To make this work, the predator particles have to have a spherical field with negative force, it is not sufficient just to set a positive goal for the prey particles (but you may set the predators force strength to -0.01). The size of the predators and the prey can be set with the Size button in the Extras panel.
[edit] Links
- Tutorial showing how to set a prey-predator relationship using Boids
- Boids in action
- Boids: Background and Update
- Flocks, Herds, and Schools: A Distributed Behavioral Model











![[]](/skins/blender/open.png)
