Menger Sponge in Blender.

@Marslyr

> Wow, that looks cool, interesting lighting as well,

Thanks!

> I’ve got some guesses, but would you mind telling me how you made/got the texture?

You won’t believe me…

The rules are pretty easy, so I launched crappy “mspaint” and made one tiny section (9x9 pixels) where the smallest part being a single pixel. Copy and pasted nine time and made it black in the middle. Take this new bigger section and repeat over and over again. You can choose to stop at any iteration, but I did so when the next step would been larger than my screen. It took about ten minutes in total.

About an hour after making this, I followed a link from the wikipedia article on “Menger Sponge” to “Sierpinski carpet” and found the exact same image (although reversed). It’s even the exact same size (729 x 729 pixels), but as mentioned this is constrained by the design as the next smaller size is 243x243 and the next larger size wouild be 2187x2187.

So I didn’t really steal it. Although I should have, and saved myself ten minutes…

Made a level 5. Seriously.

If you follow the tutorial in this thread you end up with a single complex object. At level 4 my machine is pretty sluggish but Blender runs and I can get it to render. However, an export to Indigo dies with a memory error as the object is over a million faces.

Instead, use the instructions but stop at level 3 (it looks like the first image in this thread). Then duplicate this one object (alt-D) and manually assemble a level 4. Surprisingly Blender isn’t sluggish at all and works great. In fact, you can select all the objects in your level 4, and duplicate the group until you get a level 5. Okay, at this point Blender is hard to use again, but I was able to export to Indigo (because each of the many parts is less complex) and get a render.

I should say that at each step in making the level 3 I carefully removed all unnecessary and redundant faces. Therefore, my level 5 contains (only) about 10 million faces, which isn’t bad since it represents 3.2 million little cubes. The resulting image below contains no textures - it’s all geometry. The smallest pixel-sized dots are really cubes.

Attachments


Between each level select the whole complex and press w to remove double vertices this should reduce the number of vertices in the object. Now all I need is a way to get rid of the internal faces which are never seen. You can’t get rid of them during the building process or else you end up with holes on the sides where you delete the faces But this should reduce the number of faces by a ton. Maybe some python guru can come up with something :yes::eyebrowlift:

I’m sorry for the 4 year bump, but the the tutorial link doesn’t work anymore. Does anyone have the text they can post here? I really want to see it. Thanks.