logoalt Hacker News

Hyper-Realistic Sand with WebGL2

212 points • by everlier • today at 1:39 PM • 49 comments • view on HN

Comments

smusamashah • today at 5:10 PM

Found source repo here https://github.com/av/safe-sand

bob1029 • today at 7:20 PM

I like how when my phone's forward vector is aligned with world up all the sand falls out.

alex_duf • today at 3:34 PM

On a mobile phone it makes a lot more sense. Try shaking it!

➕ show 4 replies
nkmnz • today at 6:47 PM

Something seems wrong with the stones. They seem to move way to fast. They need more friction.

weitzj • today at 6:36 PM

Does it make Patterns if you put a sine wave on your phone's speaker? What are they called? Moirée patterns?

momojo • today at 6:23 PM

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"

yipinwong • today at 7:14 PM

I felt like a kid playing with real sand in decades playing with this.

lavendermon • today at 6:42 PM

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?

smusamashah • today at 5:04 PM

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.

➕ show 2 replies
mashally • today at 6:06 PM

It was a lot of fun. I wrote I love you phrase to my gf and she liked it.

asaddhamani • today at 6:02 PM

I just spent 15 mins playing with this on my phone, it was a lot of fun!

kccqzy • today at 5:23 PM

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.

hamidmohaqeq • today at 4:20 PM

This is really cool and give a realistic sense

cheapcheerful • today at 5:07 PM

Wow man, very cool.

amunozo • today at 4:21 PM

I am feeling the sand physically at watching at this, good job!

hvvivek • today at 6:18 PM

this is super fun! well done

tgtweak • today at 5:40 PM

This one does much better at retaining volume than the smudge demo last week :)

itomato • today at 6:41 PM

You can play a nice little round of Bocce with the stones

Teladin • today at 6:23 PM

Seeing all the Macbook Pro PROLED XDR Touch Screen geeks finding a use for their new device :D

samiv • today at 5:45 PM

Cue the whines about not using WebGPU.

turadg • today at 7:16 PM

anyone who likes that should touch grass

https://grass.turadg.com/

arm32 • today at 4:19 PM

This is very fun to play with.

customguy • today at 4:31 PM

Zooming on the desktop makes it more dense looking, which is probably not intended but can look very cool IMO.

➕ show 1 reply
wigster • today at 4:31 PM

i feel like i'm watching a stop-motion movie as it moves. very nice

techpression • today at 4:03 PM

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

➕ show 2 replies
emilfihlman • today at 5:37 PM

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!

nout • today at 4:27 PM

This is annoying to clean up exactly like real sand.

➕ show 1 reply
lloydatkinson • today at 6:12 PM

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?

Razengan • today at 5:26 PM

Naturally the first instinct of man is to draw a penis.