Volumetric Fire 🔥
by Jaagup Kuhi, Siim Raudsepp and Andri Poolakese
The aim of this project is to visualize volumetric fire generation in Unity using raymarching. Repository is located at https://github.com/jaagupku/volumetric-fire
The aim of this project was to create realistic looking animated fire without using prerendered fire textures. This was achieved using a tehnique known as raymarching. Raymarching casts a ray into each pixel of the screen which then collides with the defined volume and upon collision samples the noise at that point in the volume. After that the ray is extended a set amount and the process is repeated, adding the next points color and alpha to the previous until the ray penetrates the volume, the alpha value reaches 1 or the predefined max amount of steps is reached. For the noise we used simplex noise and animated it with time.
We used only Unity to make this project.
At the start we had some problems getting the noise to be shaped like fire. After we had some initial progress, we noticed that there is some color banding while viewing the fire from certain angles. This was fixed adding some random length to the start of the ray.