The Stingray engine can generate particle systems, units specialized in spawning lightweight sprites at a fixed rate. Diverse transformations can be applied to sprites as they age; when they eventually die out room is made for new ones. In design, particle systems can be used to add an atmospheric layer to a scene. Submerging a scene in a rainy atmosphere, or shrouding the base of a building in fog at night can really give a dimension of story-telling to a
piece. This story will look at the logic behind the different components I used to create my fire. Since parameters like size, spawn rate and lifespan all depend on artistic preferences, less time will be spent defining numbers and more time will be spent focusing on the reasoning behind each system component.
I chose fire as a case study since it’s a complex element requiring multiple particle systems and other units to function properly. Complex doesn’t mean difficult though, and we simply need to tackle it one particle system at a time.
A fire would be nothing without flames; the most intriguing part of the whole unit. Flames have elaborate patterns by spawning sprites with static textures. A particle can use an animation as texture if it is in the form of a sprite sheet.
also use sprite sheets, given their optimized nature. With a sprite sheet using dancing flames as its main texture and a “UV Animation” component to move across the different frames, we only need a handful of particles to create the flames since every one of the particles will have multiple flames already dancing.that cannot be emulated simply
As the old saying goes, “where there’s smoke, there’s fire”. So it's only logical to add smoke to our unit. Creating believable smoke is pretty straight forward. The amount, opacity and lifespan of particles all depend on your preferences but three things are essential to make smoke believable:
- The material must not be an additive blend, unlike other particle systems such as lightning or sparks. This gives contrast to the flame and spark illumination.
- Regardless of overall size, particles must grow larger exponentially over their lifespan to create the dispersion effect.
- A rotation node must be added to the system to provide the motion required to blend the particles together into a singular entity.
Since the smoke system isn’t self-illuminated, it looks strangely disconnected to the burning flames. I added a light at the base of my fire to produce the lighting flames normally create. It will not only produce more believable smoke, but hopefully it also creates some nice diffuse lighting around the scene.
The finishing touch to the whole system is to add embers flying up on hot air drafts. A “Wind: From Vector Field” component will add a realistic flow to the particles. It’s a component that periodically adds random direction to the particles, simulating the wind. Coupled with any upward velocity, small bright dots of light will give the exact effect of incandescent ashes swept by the wind.
All of these particle systems work together to create a believable fireplace. With a basic understanding of particle systems and how to group them with simple behaviors, you too can easily add realistic effects to a scene.