Erosion simulation

In the summer of 2021 we rented a small cabin on the beach in the Netherlands. We don’t live close to the beach, so these few days were a lot of fun for the family.

I love naturally occuring patterns, so I started taking pictures of sand. Just plain sand at the beach.

Setting contrast to the max and you get some really interesting, grainy patterns:

I was wondering if I was able to recreate these type of patterns using code. I had been playing with a fluid simulation for a while and perhaps it was time to take that to the next level.

So back at home I dug into the code and started expanding the fluid simulation. The simulation runs live in #threejs and is a combination of various shaders. I’m not a very fluent programmer, so I took my time learning. A lot. About textures, shaders, glsl and threejs.

At some point, I managed to have the fluid interact with a solid block of -lets say sandstone- And amazing stuff started to happen. The results were just so incredibly realistic. All happening in real-time.

The only things I do are changing the water height and speed vectors. I can also play with the parameter as the erosion speed and depth gradients. And it’s a lot of fun to play with, since it’s happening live.

I rendered the images in black & white, pixelated with a monte-carlo shader so it’s only black & white pixels, similar to the original sand pictures I took. Basically, it’s just a massive QR code…

Quite happy with the results, and it compares well with the original images I took at the beach

Originally named “Erosion”, I re-minted all on #OBJKT in a collection and renamed it “Exoplanet Draugr”. As these images resemble images of a barren, distant planet. At least in my mind. Draugr is a small extrasolar planet, discovered in 1994.

You can find the collection here: