Fire (effect) on an APA102 matrix.

Status
Not open for further replies.

StefanPetrick

Well-known member
Hi,

I tryed to code a fire effect for a 16x16 matrix.

This was the first result:


The wind appeared too strong, so I adjusted the parameters a bit. Result:


In case you want to play with it, here is the code. There are many parameters to be discovered. Comments can be found in the code.

The basic idea is to have a dynamic heatmap which controls which areas are scaled down (=cooled) how much.

I used FastLEDs noise function for that mask. It also allowed me to add some movement to the sides to get it more alive.

Finally I controlled the parameters of the noise field by other noise data in order to get a kind of organic and natural look. Sometime it´s more steady, from time to time it gets more wild.

What do you think? If you know about some other fire implementation I´m happy to learn about it, too.

Cheers,

StefanPetrick
 
Hi Frank,

I like the smooth a appearence of your animation. Your code seems to be a variation of the method described here, just with more neighbor pixels for the filtering.

I improved my one a little by adding another filter mask and changing the colormapping. Not sure if that makes it more realistic but at least I kind of like the effect.

It is really challenging to get a decent result on just 16x16 pixels...

 
Status
Not open for further replies.
Back
Top