Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"?

share|improve this question
up vote 3 down vote accepted

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

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.

share|improve this answer
Thank you! I was anxious about looking into source – GameCoder Jul 17 '12 at 16:09
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. – Byte56 Jul 17 '12 at 16:37

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.