1
\$\begingroup\$

In this video demonstration, there is the annealing effect, where particles seems to loose their hue and converge into pure white, and then gradually disappear via alpha channel. And in parallel to all of this: particles are gradually becoming thicker.

I tried with my particle system and it is giving different results. How to obtain the "annealing"?

\$\endgroup\$
0

2 Answers 2

3
\$\begingroup\$

Luckily, the project is opensource. That includes the demos used to create the videos. So we can see from the demo source:

particleModel->setParam(PARAM_ALPHA,5.0f,0.0f); // the particles will fade as they die
particleModel->setParam(PARAM_SIZE,1.0f,15.0f); // the particles will enlarge over time
particleModel->setLifeTime(5.0f,6.0f);

The particles are set to fade and grow. Then in the update loop:

// Changes the color of the model over time
step += deltaTime * 0.0005f;
particleModel->setParam(PARAM_RED,0.6f + 0.4f * sin(step));
particleModel->setParam(PARAM_GREEN,0.6f + 0.4f * sin(step + PI * 2.0f / 3.0f));
particleModel->setParam(PARAM_BLUE,0.6f + 0.4f * sin(step + PI * 4.0f / 3.0f));

The three color channels are increased over time, leading to a white color. It looks like some of the particles don't have a chance to change color before they disappear, making the edges colored. The writing demo source is available here. And the entire source here.

\$\endgroup\$
1
  • \$\begingroup\$ No worries! It looks like the demos at least are commented fairly well. I'd suggest loading that whole project up and poking around, tweaking things in the demos, see how things fit together. Have fun. \$\endgroup\$
    – House
    Jul 17, 2012 at 16:37
3
\$\begingroup\$

It just looks like the blending mode between particles is additive, ie the color channels are added (perhaps with an adjustable factor) together so when there are enough particles (or bright enough parts of particles) covering a particular spot that spot will be white (each color channel is capped at its maximum value) unless the alpha has become too low.

Not sure about the scaling, to me that's simply setting the size of each individual particle sprite slightly larger over each time period.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .