Menger Sponge

Last weekend I found some time to tie together some loose ends of my Haskell ray-tracing project. The new functionality was first put into use to render the inevitable Menger Sponge as you can see below.

A Menger Sponge

Here’s a quick rundown of what’s new with this iteration:

  • added support for triangles (and meshes thereof); indeed everything visible in the above scene consists solely of triangles
  • implemented a simple BVH for intersection acceleration; the performance still leaves something to desire, but at least it makes rendering scenes with more than like 15 primitives bearable
  • there were several cleanups and simplifications all around, but it’s been a while and I don’t remember exactly…

And here’s a level 3 Menger Sponge on a “brushed metal” ground, which take ages to render, mainly because of the inefficient sampling of the glossiness:

Blue Menger Sponge


About this entry