Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Sign in to follow this  
Rss Bot

How to make a Mandelbulb

Recommended Posts

A Mandelbulb is a three-dimensional fractal that is becoming increasingly popular in 3D art and VFX. In this article, I’ll walk through how to quickly make a Mandelbulb in Houdini, using an SDF (signed distance field volume).

In each voxel, an SDF stores the distance to the nearest point on the surface. Houdini can interpret these distances, and visualise the derived surface as 3D geometry. This is very convenient since most fractal formulas take the form of a ‘distance estimation function’ – given a point in space, the function returns the distance to the nearest point on the fractal implicit surface. This means that you can put the results of the fractal function directly in each voxel and it will just work!

01. Create an empty volume

Create an empty volume toolbar

Click the icon in the top right to enlarge the image

First, create an empty volume (Volume SOP) to fill with distance values – give it the name 'surface'. A good fractal to test with is the Mandelbulb, and by default it's around 2.5 units wide, so set the volume's size to 2.5, 2.5, 2.5. You can change the resolution of the volume to trade off speed against quality; a good starting point could be setting the Uniform Sampling to By Size, with a Division Size of 0.01. The default mode of visualising a volume in Houdini is a fog volume, but you can change that to display as a hard limit surface, by changing the Display Mode to Isosurface (in the Properties tab).

02. Add some code

Add some code toolbar

Click the icon in the top right to enlarge the image

Then it’s a matter of filling the voxels with distance values. Use this VEX code in a Volume Wrangle SOP to run the Mandelbulb formula per-voxel:

03. Introduce parameter references

3D fractal

Click the icon in the top right to enlarge the image

Houdini lets you add your own custom spare parameters to an individual node’s user interface. Our VEX code contains parameter references (the chf() functions), to let us control aspects of the formula with parameters in the UI. Those parameters won't exist by default, but you can create them by pressing the Create Spare Parameters button in the right of the code window. 

In this case, the Iterations parameter will control the level of detail for the Mandelbulb – start off with 5 or 6. The Power will control the shape of the Mandelbulb – the typical shape emerges at around Power 8.0.

04. Convert to polygons

convert to polygons

Click the icon in the top right to enlarge the image

To convert the surface to polygons, follow the Volume Wrangle with a Convert Volume SOP. Use Invert mode, because it's interpreted as a signed distance field, and you'll get the detailed fractal shape meshed in polygon form. Effectively, the Invert mode reverses the normals of the surface and the winding direction of the polygons.

05. Render your Mandelbulb

mandelbulb render

Click the icon in the top right to enlarge the image

You can then render it the same as you would any other mesh, but because it's so detailed you won't be able to UV unwrap it easily – consider using procedural techniques to surface it, for example, shading based on its curvature.

This article was originally published in 3D World, the world's best-selling magazine for CG artists. Buy issue 237 or subscribe.

Read more:

View the full article

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×