Doc:Tutorials/Physics/BSoD/Particles

From BlenderWiki

Jump to: navigation, search
Image:LeftArrowHeader.png
[[{{{2}}}|      ]]>
Image:RightArrowHeader.png
[[{{{3}}}|      ]]>
Blender Summer of Documentation: Contents | Manual | Blender Version 2.42

Contents

[edit] Introduction

Blender has a fast and powerful system to create particles. Particles are the best solution to simulate amorphous effects, like wind, fire, lightning, smoke, etc. Every mesh object can server as an emmiter for particles. Halos can be directly emmited from particles and using dupliverts, you will be able to emit any type of blender object.

Particles may be set to be deflected (reflected) by other mesh objects, and may be subject to realistic basic forces of nature, like gravity or wind. Also, with the option of static particles, you will be able to generate fur, hair, and grass with a great detail of realism.

To get to it, press F7, and Image:Manual-Part-I-Interface-Context-Object-Physics.png (Particle Button). Click New and you will see a screen like the screenshot below, either in two tabs, or two panels like these.

The main particle panel

[edit] Particle Panel

  • Emit:
    • Amount: The total number of particles that will be emmited.
    • Sta: The starting frame of emission.
    • End: The last frame of emission.
    • Life: How long the particles will exist after emission
  • Static: All the particles are emitted, and are not modified. Combined with vect, can generate "fibers" and is very useful to generate grass, fur, and hair alike.
  • From:
    • Verts: Vertices of the mesh will be source of particle emission
    • Faces: Faces of the mesh will be source of particle emission
    • Rand: Random faces will be selected as emitters
    • Even: The particles emitted will be proportional to the area of the each face
    • P/F: Maximum particles emitted per face. A higher number may generate fuzziness in the emission
    • VGroup: If you have created different vertex groups on the object, you will be able to select diferent properties for each one here.


  • Display:
    • Material: What material will be used in the particles
    • Mesh: Also render the emitter mesh
    • Unborn: Render particles that will be emitted in the future frames
    • Died: Render particles whose life has ended.
    • Vect: The particles are enabled to rotate, and they get a local system of coordinates
    • Size: The distortion caused by the velocity in the shape of the particle


  • Children:
    • Generation: The current generation of particles. You can define properties for up to four generations.
    • Num: The number of generations of particles that can multiply itself
    • Prob: The probability of a particle of that generation having a child
    • Life: The life in frames of the children emitted
    • Mat: The material of the children. Using a different materials in the children may be useful, e.g. if you wish to generate smoke from fire.


[edit] Particle motion panel

  • Keys: How many control points will be calculated for the particle trajectories
    • Bspline: Uses a better intepolation between the keys, resulting in a smoother path
    • Seed: A number to generate random numbers needed
    • RLife: A random life for the particle


  • Velocity:
    • Normal: The particles gain a starting velocity with the direction of their initial normal. For those emitted from a face, it's the face normal, and for those from vertices, it's the vertex normal.
    • Object: The particles gain a velocity with a direction relative to the object center
    • Random: The particles gain a starting velocity randomly
    • Texture: Use a texture to give particles a starting speed.
    • Damping: For a non-zero value of damping, the particles suffer a drag force
    • VGroup: Here you can define properties for each vertex group defined.


  • Texture Emission:
    • TexEmit: You can use a texture to select the order of emission of the particles in the mesh. The lighther the texture in one point, the sooner the particles near that point will be emitted
    • Tex: What texture will be selected for this.


  • GR:Use this to select a group of field appliers. If none, all will effect.


  • Force: Makes the particles suffer a force during their lifecycle


  • Tex: Use a particle to generate a non-uniform force.
  • Int: Use the light intensity of the texture as a factor to generate the force
    • RGB: Uses the RGB values as components of the speed vector
    • Grab: Uses the gradient (the ratio of change) of the texture to generate the speed vector. A texture that does not change (uniform color) has a gradient of zero.
    • Nabla: The size that will be used for the calculation of the gradient. The smaller, the more precise.

[edit] Particle Interaction

The fields all share the same two properties:

  • Strength : the strength of the field effect
  • Fall-Off : how much the distance from the field influences the field strength. A Fall-Off of zero means the the particles are not influenced by the distance to the field applier

There following type of fields :

  • Vortex : This is a tornado-like force field
  • Spherical : This one either attracts or repels the particles to its center, depending on the strength being positive (attract) or negative (repel)
  • Wind : This one makes a force on constant axis for all the particles
  • Curve guide : This one atracts or repels the particles based on a curve. This will be discussed in more detail in a special part of the text below due to it´s higher complexity.

Image:Bsodparticle2.jpg

You can use any object as the field applier, but it is a common (and very good practice) to use it in an empty (except for the curve guide), because then the design is cleaner, and the workflow more organized. You can only add one force field per object. If you want more than one force field, you will need more than one object acting as the force field applier.

The three basic types of fields, applied on empties
No Fields applied
Vortex applied
Spherical Field applied
Curve Guide Applied

Here you can see the effect of Strength and Fall-off in action using a wind field applied on an empty against a static particle emitter. I suggest you click and enlarge the pictures to get a better view.

Strength:5,Fall-Off:0
Strength:10,Fall-Off:2
Strength:20,Fall-Off:7
Strength:5,Fall-Off:0,MaxDist=1

[edit] Simulating sparkles

  • Add a plane
  • Scale it down
  • Press F7 twice and press New to enable our plane for particle emission
  • Leave the default settings as they are, just enable Vect so our sparkles will stretched by their speed.
  • Go to the particle motion panel/tab, and set Normal to 0.070 and Random to 0.010 to give them an upwards speed, and a random look. Now, if you advance it some frames, you will be able to see the particles already.

If you render, you will see something like this. Now, let’s set a material for our particles.

Our first try


  • Create a material, set it as a Halo
  • In the shaders area, select the halo to have Lines, Star, X Alpha, and disable Flare,Rings,HaloTex,HaloPuno,Shaded. Set HaloSize to 0.5, Hard to max value, and Lines to 3
  • In the material area, select the halo color to be a orange, or redorange, and the lines to be yellow. Set Alpha to a value like 0.2-0.3, so our particles will be semitransparent.
  • Don't get fixed on these values. Tweak them as much as you want and render to see the results. The only thing I recommend is X Alpha, because it really increases the definition of our particles.


The material
The final render of our sparkles

Now a big block will be used to deflect our sparkles.

Add a cube, scale it down in one axis so it becomes thin. Go to the physics buttons (F7 twice), and enable our block as a deflector. Set its Permeability as zero since we don´t want any particle to pass trough. We don't need to modify Outer or Inner. By grabing and rotating it, place our block in a place it will block particle flow. Give it a slight angle, so the particles deflected will not pass by the same way they came. You probably won't see the results now, since you need to go to our particle emitter and click Recalc All. If you have done everything correctly, you will now see the particles bounce off the block.


The scene setup.
Our final render.

[edit] Emitting objects as particles

We will now use particles to emit objects. We could choose any blender object, meshes, curves, NURBS, or lamps. But in this case we will use metaballs in order to fake drops of water.


  • Create a plane, and a metaball
  • Parent the metaball to the plane. To do this, select the metaball, while holding Shift, select the plane and press Ctrl P
  • Enter object tab F7, and select Dupliverts. By now you will be seeing our metaballs being emitted
The dupliverted metaball
  • Enable the plane as a particle emitter. Decrease Ammount to 100, and give the particles a normal speed.
  • Set a water material with Raytransp and Raymirror, and you can render.
The result
Render

[edit] Good links to follow

  • Advanced methods in particles[1]
  • Creating hair with particles[2]
  • Another tutorial on how to create hair with particles[3]