Can you paint with all the colors of the wind? Leadwerks can.
Anyone who peruses the forums regularly might have noticed a fresh new intern posting a particle system feature request thread. That intern, who shall remain nameless, was ready to tackle the task of aiding in the creation of a rich particle system that was both powerful and intuitive to users. That was over a month ago… in that time I have been sidetracked with other more important and pertinent tasks but I’m proud to finally admit that the “Super Awesome Chris Particle System of Awesomeness +3” or SACPSA+3 (please note: this name has not yet been officially approved by Josh) is finally underway.
In the spirit of spring time, I decided to start off by working on particles that change colors. Colors are interesting because just like numbers, they have different coordinate systems: RGB, HSL, and HSV being the most common (in my experience).
RGB or Red, Green, Blue is the most widely known system and is usually represented using values that range between 0 and 255. The lovely cube below shows the relationship between RGB values.
HSV or Hue, Saturation, Value is a cylindrical coordinate system (shown above) and is represented using values between 0-100% for Saturation and Value, and 0-360 degrees for the Hue.
Why does this all matter? Well when you’re iterating from a starting color to a final color there is a vast difference between RGB and HSV.
For example say you wanted the particle to start as red and end as blue. The RGB path leads from red to pink to blue, while the HSV path goes: red, orange, yellow, green, blue (like a rainbow).
The resulting particle systems are as shown:
RGB
HSV
I’ve found that in the end of the day, the choice between particles changing color according to RGB or HSV falls to how the user wants the particle effect to look. I can’t wait to see how people use the changing colors in their games (fireworks, fireballs, teleporters), so that means I better get back to working on the particle system! Stay tuned for more updates!
5 Comments
Recommended Comments