the Last Flame

I finally got around to implementing 3-dimensional Perlin noise, and the first thing I tested it on was to make a flame.



Perlin-noise can create easy flame-textures if you use x and y for the first two dimensions, and the sum of time and y as the third dimension. This makes it so that the evolving structures seem to move upwards with time.

To shape the flame, I subtracted the distance from a point two thirds down the centre of the canvas, as well as an extra deterrent to make sure the flame only continues upwards, not down.

The most important part was finding the right colours, though. First, I take the absolute value of the Perlin noise, which gives those characteristic islands right next to each-other without oceans. Second, I use a custom colour palette, that looks as such:



The colours do not transition uniformly, but forms bands. This makes it so that the final animation also has bands and seems to be composed of parts rather than a flat palette.

If you look closely, you can even see the wispy blue smoke down in the black end of the spectrum It is very faint, but looks much less so in the final production. Things like this have to be tested again and again, iterated until the solution works.