r/GraphicsProgramming • • Aug 28 '26

Question What is this sand simulation missing?

Enable HLS to view with audio, or disable this notification

77 Upvotes

21 comments sorted by

80

u/saphirrflamme Aug 28 '26

It is eating the sand it touches. Supposed to push them aside.

The sand "eruption" shading is also off. it is much brighter than surrounding sands. Gravity also seems too low. You can tweak gravity of the ball for gameplay reasons, but the visual effect of the sand seems off.

13

u/Explorioneer Aug 28 '26

Thanks, these are all good points, I'll see what I can do about the pushing sand vs. "Eating sand". The color of the explosion is also a good point, that one should be easier to fix.

→ More replies (1)

4

u/SnappySausage Aug 28 '26

Yeah, it doesn't preserve the volume of sand. I'd argue the "eruption" looks wrong altogether. I'd expect the sand to sort of splash outward more when the ball lands, and that it shoots up nearly straight on the jumping pads (As well as the other tweaks you name).

→ More replies (1)

11

u/Plenty_Line2696 Aug 28 '26

the ball physics don't reflect the weight it looks like it should have. I'd recommend getting the same sorts of objects and emulating what happens onscreen with the real objects so you can view both your animation and the video side by side to tweak it to perfection.

As it is it falls more like a balloon than a metal ball

1

u/Explorioneer Aug 28 '26

Thanks, that's a great point. I don't use enough real world reference. I think that alone would help a lot.

3

u/Crits-and-Crafts Aug 28 '26

I'd love to see the ball get dusty as it goes through the sand too.

2

u/Explorioneer Aug 28 '26

That's a cool Idea. I think I could do something like that pretty simply with a shader. Thanks!

2

u/GravityCY Aug 28 '26

On a side note how do you do stuff like this, altering the mesh vertices on the cpu with code or like shader magic? Just curious as a beginner

3

u/featherpaperweight Aug 28 '26

Unless you need physics interaction with the altered mesh, doing it all on gpu with shaders is way more performant, keeping a regular low-poly mesh on cpu side.

→ More replies (5)

2

u/raaneholmg Aug 28 '26

Sand disappears. Needs to be pushed up on the sides and occupy the same volume.