This goal with this project was to create a flame thrower effect that would fit in a first person shooter.
I built the effect on the first person template from unreal and changed the code so that when the projectile hits something it'll spawn a fire effect if there isn't already one close to the location.
The particle system for the fire on the ground is made up of five emitters, three of which focus on the fire and smoke rising from the ground, and the remaining two on the fire and scorching effects on the ground itself.
I simulated the fire and smoke in embergen. This was done to minimize time spent waiting for simulations to calculate. It also has an interface that was simple enough that I felt confident I could learn it quickly enough to stay within the alloted time for the project.
For the fire on the ground, as well as the smoke from both the fire jet and the burning ground I found I needed to rely on animated spritesheets in order to get a realistic motion and be able to keep the amount of parrticles down to an acceptable amount in order to avoid unneccesary overdraw.
However, for the fire in the cone itself I was able to simplify it down to a 2x2 spritesheet from which I sampled randomly using the built in subUV function in niagara.
One thing that I wish I had more time to work on is some bugs I could not find fixes to.
Since I used one particle emitter to sample from when spawning the particles
with the other emitters and that original system also used gpu collsions I encounterd
a bug where particles sampling their spawn velocity from the original simulation
could end up with weird velocities in seemingly sandom directions.
I was able to quite quickly figure out why this happened but I was unable to fix it without
changing the system type to be simulated in the cpu which I find does not scale well in terms
of performance with as many particles as where used in this flame thrower effect.
This project allowed me to explore fluid sims and how to implement them into
a game engine in a way that is both performant and responsive.
I especially appreciate the opportunity to learn how to work with a high number
of transparent particles and the potential issues of how to work around that.
How using different blending modes to avoid the computer having to calculate
zorder of thousands of particles or using masked transparency where I can get
away with it to minimize overdraw.
It was also a good excersice in remembering that sometimes the simplest approach is the best.
Like how I explored recreating the motion of fire and smoke through a large amount particles
and found that the best way to have it look good was to make use of the motion already
generated in embergen through animated sprite-sheets.