I was wondering if anybody know how I would go about making dynamic smoke. I have a basic idea of how I would do it and I believe it involves raytracing. But if anybody has done this before, any guidance on creating my own system would be much appreciated.
Can you be more specific on the type of smoke you need? Like a smoke grenade or just a smoky particle effect? I think of CS2 smoke, but i’m not entirely sure about your question.
Similar to cs2 smoke, but it doesn’t need to change from bullets going through or anything, I just want it to have some sort of collisions and then be done making changes.
It’s hard for me to draft scripts right now, but i’ll describe it mathematically. You want to preset the radius of the smoke and (since CS2 uses voxels to make the smoke) the size of the voxels. You can get the midpoint of the smoke (or where the smoke starts from) by getting Mouse.Hit or something, and you have a function to draw the voxels from the midpoint to the edges of the sphere of smoke. To make sure that smoke doesnt intersect with walls, you can use a flood fill algorithm to procedurally “flood” the world with smoke until the amount of steps the algorithm takes is equal to our smoke radius. You can also make a function that checks if a drawn smoke voxel is intersecting another part, and if so, just destroy it.
These are the basic steps for drawing the voxels. After you do this you could probably use a particle effect for the actual smoke.
Acerola did exactly this to remake CS2’s smokes, I suggest you watch it as he uses the same implementation as how I have described, except he completely voxelizes the world, which is unnecessary to do in Roblox.
Alr, this was my plan but I wasn’t sure if that was really how I should do it, thanks for the clarification
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.