I’m happy to update this announcement about my little contribution to the open source Mandelbulber project. Earlier this week I’ve added to it a Mesh Export capability using Marching Cubes algorithm. To this end I’ve helped myself with the very clean and easy to use PyMCubes implementation. The rest was just a matter of putting pieces together. The cherry on top is the export of fractal coloring stored as texture coordinates. All of this is registered in Stanford (PLY) mesh format.
as well as:
The workflow for the new functionality is very simple. You open up the Mesh Export dialog from the File menu. Then you choose the bounding box you’d like to export along with sampling resolution along X/Y/Z directions. You can change the default output file name and then you hit the Export button. After a while you’ll end up with a fresh PLY file ready for Blender import.
In Blender I normally use the following set of steps: i. go into Edit mode, ii. select all vertices, iii. use Remove Doubles from the Tools tab, iv. use Recalculate Normals from Shading / UVs tab, v. if the normal direction doesn’t seem right use Flip Direction from the same tab, vi. Add Subdivision Surface modifier with 0/2 View/Render subdivisions. This is usually enough to give nice looking surface you see on the left in the image above. Next, we’ll talk about colors.
The colorIndex value from Mandelbulber is exported as the UV (or ST in PLY nomenclature) texture coordinates. Both U and V store the same value just for the sake of importers that can’t deal with a bit more rare 1-D texture coordinates. The material setup I’ve used for the rendering above consists of a number of multiplications, modulo, and division nodes followed by a sine node to make the coloring bounce across the palette rather than jump from one end to the other. The color “speed” is controlled by the first multiplication while the “palette” is determined by the RGB Curves node. The rest is pretty self-explanatory. The 3.142… is actually PI.
I guess that’s all there’s to be said for the moment. In the future the development should focus on making the export faster (currently it’s not parallelized at all) as well as handling the color export better (e.g. by generating a coloring texture rather than storing colors per-vertex).
This week the cherry on top for me is the fact that this modification will be pulled into the official Mandelbulber repository and distribution hours from now.
Hope you all enjoy and create fascinating universes with this new export functionality and 3D authoring tools like Blender, 3D Coat, Maya, 3DS Max, Wings, etc. etc. Cheers!