Particle System

As part of the curriculum at The Game Assembly, we developed our own 3D engine using DirectX. In our engine, I was responsible for creating and maintaining the particle system, which was used throughout all of our 3D projects.

Particle System

I implemented the whole particle pipeline which the Technical Artists then used to design their particles. This included the following:

  • Rendering the particles using DirectX
  • Loading particle data files from disk
  • Logic for spawning and updating particles in the world
  • Maintaining the particle editor

Shaders

The particle editor had support for allowing the designer to manually set which shaders to use. It also allowed for multiple textures in one particle effect. This gave the system a lot of flexibility, without having to change anything in the code.

Curves

I wanted to let the designers have more fine control over how the particles behaved, so I decided to create a Curve class. It consists of several points, each with a time and a value. The curve would accept a time between 0 and 1 and return the corresponding value in the curve. Between each point in the curve, it's possible to set an easing function. This means that the curve could have both smooth and sharp parts. To go along with this Curve class, I also created a curve editor widget using ImGui. Once the class and the editor was complete, it was easy to add support for curves in the particle system.