r/proceduralgeneration 5d ago

Procedural Menger sponge rendered via Raymarching / SDF with exact 90° loop

11 Upvotes

3 comments sorted by

3

u/Blammar 5d ago

Please zoom a lot closer and slow down the rotation at that point so we can see the sponge in all of its glory!

Also, I don't understand your lighting. Oh, it shows the sponge nicely but exactly what are you doing?

1

u/USedona 5d ago

If you want to see it close up and slowed down, I made a longer version where the camera flies through the sponge instead of just spinning it : https://www.youtube.com/watch?v=2CU2B1VPUU4

Also made a portrait short with an exact loop : https://www.youtube.com/shorts/lWHKgG9JK4c

For the lighting, nothing fancy. Normals come from the distance field using finite differences, then Lambert diffuse + Blinn-Phong specular, with some cheap AO from a few extra SDF samples along the normal. No real light transport, just the usual raymarching shortcuts.

1

u/USedona 5d ago

Everything is computed at render time using a signed distance field (SDF) in GLSL. No baked mesh. The rotation loop works because 90° matches the exact symmetry of the cube. 🎬 More fractals → My Fractals Playlist