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
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