06.12 · 3D & Advanced
Ray Marching / SDF Scene
A 3D scene drawn only from formulas, circled by a camera. Best for art pages.
Watch it
It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.
Inside, every pixel sends a ray into the scene. The side view shows one: each circle reaches the nearest surface, so the ray jumps that far, in smaller and smaller steps near a shape.
Too few steps stops many rays before they reach a surface, so the floor and edges go missing. Enough steps, as set in Detail, lets far more arrive; Low still loses some.
Try it
Change a setting and see the difference as it moves.
Scene
Shapes that melt, shapes cut from shapes, or endless copies.
Camera speed
How fast the camera circles the shapes.
Real soft shadows; costly, so best left off on phones.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a ray-marched 3D scene to [the section you want it in]. Draw the whole scene in a fragment shader, with no 3D models: describe each shape as a formula that gives the distance to its surface, then for every pixel step a ray forward by that distance until it touches a surface, and light that point. Formulas let shapes melt together, be carved out of each other or repeat without end, while a camera circles them. Every pixel does a lot of work, so draw fewer pixels and take fewer steps on phones. If the visitor has reduced motion turned on, show one still frame. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.