About the project

Fire is an intriguing challenge for a technical artist, and I wanted to try my hand at it. As I do with every project, I look closely at reference. In this particular instance, I spent quite a while looking at both real life flamethrowers and how flamethrowers are represented in games. My main reference video was The Slow Mo Guys’ video, since it was 4k and in slow motion: the perfect reference. I didn’t realise how much smoke was created when using a flamethrower, and after showing my effect and reference to others, they were also surprised by the amount of smoke. This could possibly due to how the weapon is represented in games, since a surprising amount of them don’t look even close to how they look in real life. I believe that is partly because of gameplay reasons, smoke shouldn’t be covering half of the player’s screen, especially not in an FPS. Another very probable reason is that there were limitations due to performance, since this effect can easily add a lot of overdraw to a scene.

On top of the flamethrower effect, I also wanted to create a system for fire propagation. I had seen a voxel based system that seemed very interesting, but that also seemed way out of scope for my time frame of approximately three weeks half time. Instead I settled on creating a blueprint system that spreads via the master blueprint, but allows for a lot of customization in the child blueprints with plenty of events and variables that are exposed to the end user.

The flamethrower model is made by Timothy Grippin on Sketchfab. I created the very basic animations and blendspace that was required for the ability to aim up and down. After doing this I could get a whole other feel for the effect, since it was placed in a proper context.


Flamethrower: The Basic Setup

The flamethrower effect is split into three different particle systems. It is the active flamethrower, the idle refraction/fuel splashes, and the small flames that ignite the fuel. Since the active effect is the most important, it will be the one I focus on.

 

Before I had even started the project I had gotten some feedback that it would be a good idea to use a ribbon for the first few meters, since I would get a lot of particle separation in that area otherwise. This sounded like a very good idea, so I started with that. I actually use two ribbons, one for the liquid spray, and one for the actual flames. I could probably do these in the same ribbon, saving some performance. They are separate because they are slightly off sync, so that when the player first starts firing, they only see the liquid, before it actually ignites.

The main flame ribbon uses a texture for the main shape, since it seemed like it always had a strong line going along the liquid. This line was asymmetrical too, which led me to handle it differently, since the ribbon flips depending on which side you look at it from. I solved this problem by lerping between a non-flipped and a flipped texture based on the dot product between the camera forward vector and the player direction. This is almost never seen because of the nature of the camera angle I chose, but I thought the solution was fun, so I put it in anyway.

The smoke uses the interpolated shadowmap technique I talk about in more detail in the Smoke Lighting project. Unfortunately, it isn’t very noticeable due to the dark smoke. If I had more time on this project I would’ve tried to get a more fluffy and brighter look to the smoke, since they are a bit too harsh in their current form.

 

 

Fire Propagation

The fire propagation setup was mostly an exercise how inheritance works in Unreal. I made an actor with all of the basic functionality, called FirePropagation. When it is overlapping another actor with the same class as itself, it tries to spread to it. When I want to create a new object that can be burned, I can create a new actor that inherits from this FirePropagation.

I exposed a lot of functions and variables to the end user, so it’s easy to create customized effects. This makes the system very flexible, and can be used to burn any type of object. In the image below, 1. is in the base blueprint, calls to empty functions, which are then overridden in 2., which is in the bush blueprint. This way, I can easily add a particle system that plays after the object has stopped burning, or only update the shader variables while the object is still burning.

 

Final thoughts

I am pretty happy with this project. The flamethrower is pretty convincing, and the fire propagation system works. I got to explore a lot of my interests. If I were to spend some more time on this project I would focus on polishing the smoke. I feel like it has edges that are too hard and the lighting is barely visible. The ribbons work fairly well, although there is the initial harsh edge that I couldn’t seem to avoid no matter what. I am glad I followed the advice of using ribbons for the initial portion of the effect. I tried using just particles, and it just wouldn’t have worked as well; even if ribbons are a bit more difficult to work with.

The fire propagation system is fun, but I highly doubt that it would be viable in a game. It seems really inefficient, and requires a lot of manual work, even with the setup I created. I would’ve loved to experiment with the voxel based approach, but of course, due to time constraints, I wouldn’t have had time to do that. I am still pleased with experimenting with inheritance, and making an interface that is easy to use for child actors.