Particle Life

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 16:36, 26 November 2013 by David Stoffel (talk) (Created page with "== General == Image:17_Par36_e.jpg Inside the flag "particles life" the appearance of the particles during their life time is adjusted. == Size of particles == This curv...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

General

17 Par36 e.jpg

Inside the flag "particles life" the appearance of the particles during their life time is adjusted.

Size of particles

This curve characterises the size of a particle during its lifetime. More precisely you adjust a factor with this curve. Multiplicated by the starting size of particles (see Size of particles) its current size results at every point of time.

The factor can accept values between 0.0 to 1.0.

Hint: A factor with a value of 0.0 reduces a particle to a very small one, depending on the graphic driver is starts to flicker possibly but it will not become invisible. Better use black than one of the mixtured colors (see below).


Handling of the imput field of curves

This imput field it is possible to model a curve progression. At the beginning the curve has two reference points - one at the beginning and one at the end.

By adding new reference points more complex curve progressions are possible.

Adding a reference point

17 Par26.jpg

Move the mouse along the imput field to a position where no reference point exists - a vertical mark appears. If you now press the left mouse button a new reference point will be inserted into the curve.

Figure above: vertical marker, Figure below: curve progression with a new reference point

17 Par27.jpg

Move Point

17 Par28.jpg

You activate a reference point by moving the vertical marker into its direction. The reference point changes the color from white to red.

You can now pull the point directly by holding and moving the left mousebutton. If a point is already choosen and the mousebutton is pressed only the vertical position of the cursor can be changed. The reference point also can be moved by the mousewheel, without pressing the mousebutton. Thereby the cursor has to stay at the position of the reference point.

Delete a point

Mark a reference point and press the right mousebutton to delete it. Start- and End-point cannot be deleted.

Combination color

Every particle gets a starting color at formation (see Min./Max. Life). During its lifetime 4 more colors can be mixtured to this color. The combination color is defined by a seperate curve.

17 Par29 e.jpg

The number of all active combination colors will be adjusted by this modulator. If the adjustement is 0 the particle keeps its starting color - at 1 the combination color will be activated, at 2 two combination colors will be activated and so on.

Combination colors 0-3

The adjusted combination factors move inside the area of values between 0.0 and 1.0. The value 0.0 means, that particle keeps its color, at 1.0 the particle completely takes over the combination color.

Exact calculation of the color:

C be the starting color of the particle
C0-C3 the combination colors
f0(t)-f3(t) the combination factors,
and Cn(t) the resulting color after using the combination colors 0-n,

as a result the color Ca(t) of the particle will be calculated,
When there are "a" active combination colors (see Combination color),
at a special time "t" as follows::

C0(t) = (1.0-f(t))*C0 +f0(t)*C0
C1(t) = (1.0-f1(t))*C0(t)+f1(t)*C1
C2(t) = (1.0-f2(t))*C1(t)+f2(t)*C2
C3(t) = (1.0-f3(t))*C2(t)+f3(t)*C3

If a = 0: Ca(t) = C
If a > 0: Ca(t) = Ca-1(t)


In a nutshell: The starting color first will be combined with combination color 0, the output will be combined with combination color 1, and so on. This sequence can influence the final output.