Voxelized Smoke

Hello, I’ve recently created a module that can create smoke very similar to the CS2 smoke.

(uncopy locked place)
Here’s an example of what it can do:

How to use in-game:

  • Press Mouse 1 to Create the Smoke
  • Press Mouse 3 (Scroll Wheel) to Create Holes in the Smoke

The smoke bends around obstacles and you can even interact with the smoke.
It supports multiple smoke instances too!

Use Cases:

  • Great for FPS games
  • Smoke bombs/grenades

The module is quite easy to use, so I hope you can make some great things with it



69 Likes

Looks super cool! Trying it right now.

2 Likes

This is great, however, is the performance good?

2 Likes

The biggest hit to performance is the actual particles. Meaning that mobile devices might have some troubles with it, if they do you can always just decrease the amount of particles each voxel outputs

(Lower the end value of the for loops at line 124 and 219)

If performance becomes an issue, I could add greedy meshing and use attachments instead of parts (im using parts atm due to there being a built in function to see if a part is occupying a space)

7 Likes

cool, I will put this in my `DANISH BOMB` which is my joke bomb from denmark, it will put smoke

1 Like

Perhaps you could apply greedy meshing to counter this behavior?

1 Like

Yes, maybe you could try greedy meshing!

Would be interesting to see how it performs :grinning:

2 Likes

Holy smokes (Kill me)! This reminds me of Counter-Strike 2! (I typed this without reading beforehand.)

2 Likes

lil update:
I’ve made a module that keeps the voxels inside of it when they arent needed and retrieves them when needed, so performance should be a bit better

and you can find the changes in the uncopy locked place

1 Like

You could try incorporating greedy meshing to lower the part count: https://youtu.be/L6P86i5O9iU?si=kqRpBrICas4mZMQu as suggested by @kalabgs & @SwitchedDreams

Or check this out alternatively: How to make a Greedy Mesher - #2 by fathawks

4 Likes

pretty cool resource, is there a way to adjust the size of the “voxels” to be smaller, so we can have smaller holes in the smoke.

Also I just theorized that a similar smoke system could be done with particle physics and raycasting which ill probably try later.

2 Likes

Yes, you just have to change the resolution setting when creating the smoke, you can look at the example script I already made

3 Likes

It seems like the game is broken

1 Like

sorry about that, it seems that a script didnt fully commit before i published and closed studio

1 Like

Do you mean CS2 csgo doesn’t have dynamic smoke

1 Like

Could you rephrase that, since I don’t fully understand what you mean

1 Like

CS:GO doesn’t have smokes that can fill the room or get holes in them. That’s CS2

2 Likes

Oh wow i’ve been looking for something like this for so long, thank you!

1 Like

trying it right now, it’s pretty neat.

the only issue i’ve encountered are just the fact i can’t do multiple smokes, but that seems like a me problem of not being smart enough to script.

i managed to make a working smoke grenade tool out of it, here are the results.


this is honestly pretty cool

1 Like

This reminds me of a YouTube video I watched recently, I’m going to assume it inspired you too? Honestly this is really cool! Nice work.

2 Likes