Fire! Wee look at 2D fire and "sun" (or fireball) effects I've improved a

Fire! Wee look at 2D fire and “sun” (or fireball) effects I’ve improved a bit lately. Who else has done 2D fire effects? These are both done with lots of use of the noise functions but i’m sure there are lots of ways to make decent looking fire.

Nice effects. Is the code somewhere publicly available?

Looks amazing! I’ve done 2D fire by just repeating Fire2012 using a 2D heat array, by using noise with a vertical direction and heat palette, and a FastLED port of ‘MessageTorch’. Yours definitely look better!

You’re pretty close to what I did then. I used a fiery palette and pushed the noise up the y direction every frame but also along the z (that’s the bit that adds the magic really!), then there’s a fade off dependent on the height so the bottom gets full values, reduced linearly up to the top so the ‘hottest’ parts are the bottom. No post-able code yet, this relies on my mapping stuff and i’d have to spend far too long carving out bits from a monstrous code-spaghetti to post anything decent, it’s pretty simple so long as you know the co-ords of each point in some way. the main heart of it is something like paletteVal = inoise8(xcoord,ycoord+counter,counter); done for every pixel, actual led data filled in with: leds[i] = ColorFromPalette( currentPalette, paletteVal, 255, currentBlending);

That’s pretty inspiring. Would be very cool to have a simple/short routine that uses palette(s), noise and fades to create fire. Would like to see a bit more of that algorithm.

Update: Here’s my 1D slapped together version:

That looks really nice. Thank you for the tips.

Looks great, @devicer ! And @Andrew_Tuline , your two-line version is sweet!

Very nice effect. I just finished Mark Kreigsmans Fire2012 1d code/strip and it doesn’t look too good. Using 144LED per meter around a pole, 70 at about 7" tall and it just looks too contrived. Your code looks so natural and realistic. I’m impressed.

@Freddie_Olivas @devicer 's is a matrix. Kriegsman’s fire is an incredible effect for a single straight strip if you use it with subtlety and proper diffusion (I’ll post pics of my dragons when I get back from DC). A 1D effect around a 3D pole would look bad. A 2D one might too.

Absolutely right. Without proper diffusion the illusion isn’t realistic. I need to add an additional layer of diffusion and brightness correction. Next on my list to do. Thank you Mark Kriegsman for your wonderful contributions to this site.

Would love to see some 2d fire code also :slight_smile:

I need do something like that for my son birthday. Can you share your code? Will be very useful.