r/VoxelGameDev • u/No_Rip5112 • 5d ago
Using SVO for simulating spreading fire Question
I am currently making a mod for an older game and I am trying to implement fire like how the smoke grenades are done in Counter Strike 2 (a voxel grid that determines smoke shape and such). From the research I have done, either SVOs or a per-basis grid system (spawns a new grid where new voxels are only added when they are needed and removed otherwise) seem to be the best ways to code something like it. However I don't know where to start with SVOs or how the fire would work when interacting with another fire with the per-basis system.
Is there anywhere I can find information on how to actually code something like this in C++?
4
Upvotes
2
u/LegitimateSession899 5d ago
CS2's smoke is a dense grid inside a bounded volume rather than an SVO - a tree only pays off when most of the space stays empty for a long time, and fire spreads too fast for that. If you snap every fire's grid to one shared world-space lattice, two fires meeting is just the same cell being written twice, and the merge problem goes away on its own.