Hyper-Realistic Sand with WebGL2
187 points by everlier 6 hours ago | 42 comments

lavendermon 4 minutes ago
Tried this on desktop and mobile, totally different experiences. I love the residue effect on the screen after I tilt the sand around on mobile. Next step: hourglass or maybe a snow globe?
reply
weitzj 9 minutes ago
Does it make Patterns if you put a sine wave on your phone's speaker? What are they called? Moirée patterns?
reply
smusamashah 2 hours ago
Found source repo here https://github.com/av/safe-sand
reply
alex_duf 4 hours ago
On a mobile phone it makes a lot more sense. Try shaking it!
reply
leobuskin 4 hours ago
It doesn’t in my case, I see some weird animation, everything disappears, “pour” button again. Shaking or any other movement doesn’t help. Latest chrome on iOS
reply
mywittyname 45 minutes ago
Do you have shake as undo still enabled? It's one of the most annoying features in iOS.
reply
ChrisMarshallNY 2 hours ago
It helps, if you lock orientation on the phone.

Whenever the phone detects an orientation change, it resets the layout.

reply
AndrewSwift 3 hours ago
Works for me in Safari — iPhone 17 Pro, all up to date
reply
dylanowen 4 hours ago
The sand is pouring onto the phone screen so if your phone is tilted or upside down it looks illogical
reply
mattlondon 2 hours ago
Nothing happens on my android phone
reply
jarek83 2 hours ago
I had that too on brave then realized that brave locks all permissions. It worked as expected in chrome
reply
theowaway213456 3 hours ago
I think it responds to tilting, not shaking?
reply
dyauspitr 2 hours ago
Maybe it’s too much for my iPhone 13 or something, I can see it but it’s all choppy and slow
reply
momojo 23 minutes ago
This brings me a lot of joy. I love little toys that exist for no other reason than "I really want this to be a thing"
reply
mashally 39 minutes ago
It was a lot of fun. I wrote I love you phrase to my gf and she liked it.
reply
asaddhamani 44 minutes ago
I just spent 15 mins playing with this on my phone, it was a lot of fun!
reply
smusamashah 2 hours ago
oh wow, the stones even have some water around them. This looks and feels real.

And if you manage to collect a lot in one place, the sand from the pile does fall like real sand. This is amazing.

The sound is not good though.

reply
catapart 2 hours ago
They have different characteristics, too. The red, desert sand is clumpier than the beach sand, for instance.
reply
jarjoura 2 hours ago
yup, I would just remove the sound effect completely.
reply
kccqzy 2 hours ago
It didn’t look realistic to me until I added `?sand=beach` to the URL. Maybe I only associate sand from the beach as sand. Others I call silt perhaps incorrectly.
reply
hamidmohaqeq 3 hours ago
This is really cool and give a realistic sense
reply
hvvivek 28 minutes ago
this is super fun! well done
reply
cheapcheerful 2 hours ago
Wow man, very cool.
reply
amunozo 3 hours ago
I am feeling the sand physically at watching at this, good job!
reply
itomato 5 minutes ago
You can play a nice little round of Bocce with the stones
reply
tgtweak 2 hours ago
This one does much better at retaining volume than the smudge demo last week :)
reply
Teladin 23 minutes ago
Seeing all the Macbook Pro PROLED XDR Touch Screen geeks finding a use for their new device :D
reply
samiv 2 hours ago
Cue the whines about not using WebGPU.
reply
wigster 3 hours ago
i feel like i'm watching a stop-motion movie as it moves. very nice
reply
emilfihlman 2 hours ago
I think it's lacking momentum, the sand stops way too abruptly, and the audio also has too harsh cutoff. It also falls too fast.

Otherwise really amazing!

reply
arm32 3 hours ago
This is very fun to play with.
reply
nout 3 hours ago
This is annoying to clean up exactly like real sand.
reply
bovermyer 24 minutes ago
Yeah, it's coarse, and it really gets everywhere.
reply
techpression 3 hours ago
I wouldn’t call it realistic, sand gets stuck in the air, stones don’t rotate, and there’s quite an uncanny valley effect based on angles. Still a cool demo of what is possible, even though I get 10fps or something on a iPhone 15 Pro
reply
vfosnar 3 hours ago
didnt encounter the stucking issue but agree with the overerall point, the sand gets a sort of 'build-up pressure and bounce back' effect which breaks the immersiveness for me, otherwise cool
reply
zamalek 3 hours ago
What do you mean "stuck in the air?" It's top down.
reply
techpression 3 hours ago
They don’t move, not even when pressing with your finger, “stuck on the ground” then, it’s the same outcome.
reply
customguy 3 hours ago
Zooming on the desktop makes it more dense looking, which is probably not intended but can look very cool IMO.
reply
SamBam 24 minutes ago
Such a curious effect, although it makes sense given that each particle is probably being positioned in absolute coordinates with respect to the screen boundaries. So each grain gets bigger but stays in place.
reply
christkv 4 hours ago
reply
lloydatkinson 34 minutes ago
Runs like crap on iPhone 14. I know it’s not the current generation of phone but is there really that meaningful of a difference between that and a current one?
reply
Razengan 2 hours ago
Naturally the first instinct of man is to draw a penis.
reply