r/TechnicalArtist • u/gennai777 • 9h ago
Showcase Grass fire with no particles: a random cellular automaton on a GPU map, ticked at 30 Hz
I wanted ignite(point) to be the only call a game has to make, and the fire to run out across the meadow on its own. I ended up with the old forest-fire cellular automaton. Nothing new there, I just put it in a texture the grass already had.
My grass already keeps a small press map on the GPU for trails. I gave the second channel to the fire. A burning cell gets a chance each tick to light its neighbours, a slightly better one downwind, and burnt cells stop. Cut lanes write into the same map, which means a mown strip works as a firebreak and I wrote nothing extra for it.
Frame rate was the annoying part. Updating once per frame would crawl at 20 fps and race at 144, so I tick at a fixed 30 Hz, zero to two steps per frame. I measured the front speed at 20, 60 and 144 fps and they agree within half a percent!
The flames are one draw call over the burning tufts, with smoke, sparks and an optional light along the edge. No GPUParticles. douse() puts it out.
The wind bias on a square grid still makes me a bit nervous, since I can't tell if a diagonal front looks too square. Does anyone know a cheap fix?
It's part of a grass pack I make for Godot 4. Browser demo on the page, free zip under Download demo: https://gennai.itch.io/grass-wind-vfx-godot-4


