Pages

Monday, 17 April 2017

Unreal 4 Procedural Fire System

During my University third year, I was given the opportunity of creating a number of small research projects. During the second part of the year, I chose to create a procedural fire system for the Unreal engine.

The brief was, just that, to create procedural fire for Unreal 4. Naturally, this meant coping with the intricacies and limitations of the unreal engine as well as the technical challenge of creating a procedural algorithm for creating a spreading fire.

Fire has of course been used in many games. The first time that I recall a procedural fire being used in an AAA title was Farcry 2, and it has been used in many iterations since. It is a heavy system as it requires a lot of particle effects to generate and depending on the aesthetic of the fire, it could potentially cause framerate drops. Nonetheless, the aesthetics of the fire was not a concern, the actual generation was the main project here.

Firstly, I attempted to do the project in Unreal's C++, however, none of the tutorials actually worked for me and I seem incapable of doing anything with that other than breaking things, even when I follow the official Unreal tutorials word for word. They are of course out of date and people have reported similar difficulty, and thus I fell back to creating the system using Unreal's Blueprint coding language.

Blueprint, while restrictive and finicky got the job done, and I managed to create a generator for the fire system which could be placed anywhere in the level. The idea was for it to be placed down as a result of a grenade impact, and from there it would generate fire out. 

The generator searches out for objects which are tagged flammable and then generates a flame square on top of the object. The flame square then does the same thing. It also searches for flammable objects around it and compounds their fuel variables, so fires in the centre of a 'fire' will burn for longer whereas fires on the edge will burn out.



Feel free to download the project and try it out.

Unreal Version 4.8.3 required

https://drive.google.com/drive/folders/0B2-4-3Aj27LXUHplanhaQjY0TTg?usp=sharing

I will be posting a video of the system in action soon.

No comments:

Post a Comment