Optimized Sand Simulation

If I wanted to make a realistic sand simulation, what would be the most optimized way of doing so, while also keeping the features of real sand?

1 Like

You can’t realistically “simulate” sand since that would be a pain. If you want sand particles then I suggest ParticleEmitters or Beams.

1 Like

If you mean like Powdertoy or this roblox game

then yes you could.


They’re complicated cellular automata. Which you can multithread (roblox parallel lua).

1 Like

I think you could, it would just need to be optimized well

No I don’t mean 2-d. I’m talking about a 3-d simulation

What do you want to use the sand for?

So you can build with it, but the gravity is realistic

Like in minecraft where sand blocks fall down if there is nothing below them?

No not blocky, I mean like actual sand particles that have realistic physics, that you can scoop

Too taxing. Computers aren’t powerful enough to realistically simulate water vapour for fog, so there’s no way they’d be able to physically simulated literally millions of grains of sand.

Could you give a more detailed description of what you’re trying to achieve?

Do you want a beach game where you can build sandcastles?

Could mesh deformation be used instead, so players could “shape” the sand

You could use roblox’s Terrain for that

There a feature deform terrain in real time?

1 Like

Yea there is, multiple games use it

Would it possible to convert what ever part is subtracted from the terrain into the player holding a mesh that can be deformed, so players can pick up sand and place it else where

The terrain is a cubic grid where every block stores a number and material type. So you can store those values and recreate them somewhere else.

But unless you can perfectly recreate how the terrain makes a mesh from that information you can’t make a player hold it as a mesh.
(also each cube in the terrain is about the size of the player, so the player would need a rather large scoop to be able to hold anything that resembles anything)

You could probably just let a bucket of some sort fill up by resizing a cylinder with sand material inside of it and making it smaller when substracting sand again

1 Like

are your commissions open, i can pay 20,000 robux for the system I need if you can do it

1 Like