This is a fractal animation of a mandelbulb created using fluid effects in Autodesk Maya 2013. It took 12 hours to render this 16 second animation using an 8 core Mac Pro.
Autodesk Maya 2013 now includes a new 2D / 3D fractal system that can create fun and exciting fractal shapes like a mandelbox or mandelbulb right in your Maya viewport. The system works by using a Maya fluid effects "fluid container" to support rendering the fractal voxels with either a volume render or a hard surface render. You can also create fractal textures in the Hypershade.
How to create a 3D fractal in Maya
To use the new Maya 2013 fluid effects based fractals you need to add a 3D fluid container to your Maya scene.
Switch to the Dynamics menu set. From the Fluid Effects Menu, select Create 3D Container.
With the new fluidShape selected switch to the attribute editor. From the Presets* pop-up menu in the attribute editor select a fractal preset. After you apply a preset you can customize the fluidShape attributes to create the fractal look you are after.
At this point you can render the fluid container using Maya's software renderer. It is possible to animate a camera through the fractal shape volume or use Maya's stereo camera feature to render the fractal shape in stereoscopic 3D.
You can also convert a fluid effect based volumetric fractal into a polygon surface. To convert the fluidShape into a polygon mesh go to the Modify menu and select Convert > Fluid to Polygons.
The mesh is created with construction history enabled so you can edit the fractal settings and the polygon output will be updated parametrically.
Animating Fractal Attributes
If you have enough patience and render power you can animate the fractal attributes in Maya. During my initial tests it took my 8 core Mac Pro system 2 minutes to render a 1920x1080 fractal image using the Maya Software Renderer.
My first fractal animation test was to create a camera animation. I flew the camera close to the mandelbulb fractal surface and explored around the perimeter of the mandelbulb shape in a 384 frame sequence. You can view the animation at the top of this blog post.
My next test was to animate a the shape of the fractal. I keyframed a few attributes like the lobe attribute, the color ramp, and the frequency attribute. You can scale the size of the fractal inside the fluidShape node by changing the Zoom Factor attribute. The Zoom Factor will also change the color of the fractal if the fractal texturing is driven by the "Center Gradient" color input.
I found it helpful to adjust the Color Input Bias attribute over time to maintain the look of my fractal texture. When the scale of the fractal changed over time the tips of the fractal lobes would become brighter or darker based upon the point's distance from the fractal origin and the corresponding location applied from the color ramp texture.
You can move / scale the whole fractal object in your Maya scene by translating the fluid effects fluidShape node.
It is also possible to translate the raw fractal points inside the fluid shape by changing the Texture Origin attribute. You can rotate the fractal points inside the fluid shape by changing the Texture Rotate attribute. If you textured your fractal shape using the "Center Gradient" color input you will notice the texture origin / texture rotate options will move the raw fractal points separately from the color shading applied to the fluidShape node.
Don't forget to do a Playbast in Maya to test your fractal animation before committing to a final Maya Software render that will take hours!
Animating the fluidShape1.color Ramp Attribute
A nice feature of Maya's fluid based fractal system is the support for animated colors. With the help of keyframe animation techniques you can use keys to change the fractal color and texture placement over time.
let's start by selecting the fluid shape. Expand the fluid shapes' Shading section and then the Color section in the attribute editor window.
Animating the Selected Color Attribute
Let's animate a ramp color value. The Selected Color attribute allows you to animated any of the colors shown in the ramp window.
To choose a color on the ramp, move your cursor over the gradient area and select the ramp's circular control handle for the color you want to animate. The current color that is shown in the Selected Color swatch updates based upon the last ramp control handle you clicked on.
To keyframe animate the color values, start by setting Maya's playhead to the starting frame of your animation. In this case the playhead is on frame 1.
In the attribute editor, right click on the words "Selected Color". In the popup menu select "Set Key". This will set a keyframe for the current color value shown in the swatch.
To animate a color value you need to have set two or more keyframes.
Let's move the playhead to the next point in our animation. In this case I set the playhead to frame 12.
Click on the selected color swatch and select a new color in the color picker. At this point a we haven't set the 2nd keyframe for the color value.
After you close the color picker, right click on the words "Selected Color". In the popup menu select "Set Key".
By setting two keyframes a new animation curve has been created for the Selected Color attribute. The first keyframe is on frame 1, and the 2nd is on frame 12.
When you drag the playhead in the timebar you will see the color values change in the viewport. If your fluid shape is set to a high resolution you may want to use a playblast to preview the effects of the color animation.
If you want more control over the Selected Color keyframes you can view the animation curves by clicking on the triangle shaped button to the right of the swatch. A new editor window will appear in the attribute editor that will let you change the keyframe time and value settings using a table style layout.
Also, if you want to visually edit the fractal color animation curves you can use the graph editor.
Animating the Selected Position Attribute
You can also animate the position of the colors in the ramp by keyframing the "Selected Position" attribute. It is possible to adjust the location of the colors in the ramp by by dragging the circular ramp control handle left or right or by changing the Selected Position value numerically (with a value ranging from 0 to 1.0) with the text field.
Let's animate the selected position attribute. Move the playhead in the Maya timebar to the starting frame of your animation. In this case I'm starting on frame 1.
Open up the attribute editor, and right click on the words "Selected Position".
In the popup menu select "Set Key". This has set the first key for the Selected Position attribute.
Advance the playhead to the next point in your animation. In this case I'm on frame 12.
Slide the ramp control handle to a new position on the ramp. Right click on the words "Selected Position". In the popup menu select "Set Key".
This has set a 2nd key on the Selected Position attribute.
If you have a lot of gradient colors in your ramp texture the ramp window might be too small to use. You can click the arrow icon to the right of the ramp pattern to open the ramp up in a larger floating window.
When you use the expanded ramp control window, the keyframing controls work the same way as in the attribute editor. You can use the same right click technique with the Selected Position and Selects Color attributes to add your own keyframes.
At this point, when you scrub the playhead in the Maya timeline you will notice the changing color of the fluid shape.
If you want more control over the Selected Position keyframes you can view the animation curves by right clicking on the word "Selected Position" and selecting the first option in the pop-up menu which in this case is called fluidshape1_color_0_color_Position.output.
A new editor window will appear in the attribute editor that will let you change the keyframe time and value settings using a table style layout.
Rendering Animated Fractals
For the best results you need to render your fractals with the "Maya Software Renderer".
Also it appears you need to force Maya to recompute the fluidShape node between each frame of your animation if you keyframe animate the shape of the fractal. I haven't spent a lot of time exploring the best way to do this. For the pulsing fractal GIF animation above I opened the render settings and set the animation to skip frames when rendering with the by frame attribute. This automatically caused Maya to update the fluidShape on each rendered frame in the sequence because of the frame skipping.
Other solutions to force Maya to recalculate the fluidShape node on each frame of an animation would be:
- In the render Settings window under Render Options you might be able to use the Pre render frame MEL field to update the FluidShape before rendering the next frame. (I haven't explored this option yet)
- You could use batch rendering software like Smedge to reduce the size of your batch render "slices" to individual frames. This would relaunch the Maya "render" program on every single frame of your animation, which would force Maya to recalculate the fluidShape.