A few weeks ago while browsing YouTube for Fractal movies I came across a video that claimed to be (as of its post date of January 26, 2010) the deepest zoom movie on YouTube. The video was of an interesting area, but what really caught my eye was the information that the video took six months to render. Six months on twelve CPU cores.
I’ve worked pretty hard at optimizing Fractal eXtreme’s calculations so I decided to see how long it would take FX to render the exact same movie.
It took 18 hours. That’s 240 times as fast.
After doing this experiment I also added some new features to FX to allow the creation of better quality zoom movies. These are discussed here – that second link also discusses making a 4K version of this same movie.
I had expected FX to be faster, but 240 times faster was more than I had expected. So where did the speedups come from?
Different computers: The original render used three quad-core computers of 2009 vintage. I’m using a four-core eight-thread 2011 Sandybridge laptop CPU. Sandybridge is really fast, but my laptop CPU has a max clock speed that is a lot lower than on desktop parts, and the hyperthreads aren’t as powerful as real cores, and I’ve got fewer total threads. So, I suspect the total CPU power available is close to identical. FX speedup 1:1.
Interpolation: The original render calculated every frame, whereas Fractal eXtreme calculates key frames, separated by a magnification increase of 2.0. The original render ran at 30 frames per second for 312 seconds, for a total of 9,360 frames. Some of them are stationary frames at the beginning, but because the zoom speed drops at the end a higher percentage of the frames are towards the end where rendering takes longer, so the ratio of 9,360:916 is probably pretty reasonable and FX does about ten times less work. FX speedup: 10:1
Guessing: Despite its chaotic nature the Mandelbrot set has many large areas with a constant iteration count. Fractal eXtreme recognizes these and avoids calculating every pixel in these regions (it is very conservative in order to avoid errors). In extreme cases where there isn’t much detail this guessing can avoid calculating 90% or more of the pixels without changing the result. Overall the guessing reduced the workload by about two thirds. FX speedup: 3:1
Doubling magnification: Each Fractal eXtreme key frame is exactly double the magnification of the previous key frame. That means that one quarter of the pixels from key frame ‘n’ are also in key frame ‘n+1’. That means that Fractal eXtreme usually only has to calculate 75% of the pixels in a key frame, with no change in the final results. FX speedup: 4:3
Great programming: With 40:1 of the 240:1 advantage explained I think we are forced to conclude that Fractal eXtreme is just faster. The additional 6:1 advantage could come from using 64-bit math instead of 32-bit math (good for about a 4:1 advantage) plus using fully unwound math routines (good for perhaps a 1.5:1 advantage), but this is purely speculation. FX speedup: 6:1
Being able to calculate the same movie (same maximum iterations, depth, and target location) in 18 hours is nice, but we can do better. And, to be honest, when you interpolate key frames that have aliasing you do lose some quality. However if you antialias the key frames before interpolation then you actually get a higher quality movie, with more of the subtle detail visible, even after interpolation. And if you antialias and render at a higher resolution, you get an even higher quality movie. And, due to the nature of the Fractal eXtreme zoom movie interpolation system, you can play the movie back at a higher resolution than it was rendered and actually increase the quality even more.
So…
Same location, same maximum iterations, slightly higher maximum zoom depth (to finish all the way into the final Mandelbrot set), 960×540 render resolution (up from 640×480), 3×3 antialiasing, and a final output resolution of 1280×720.
The higher resolution and antialiasing make a stunning improvement to the video quality. The moiré patterns and flickering pixels are gone, subtle ribbons of color are consistently visible even when they are less than a pixel wide, and the boundaries between bands are smooth. Because the interpolation is done after the time-consuming render it was possible to experiment with different zoom speeds, which allows the movie to go fast when there is little detail, and slow down whenever a mini-brot or other tourist attraction appears.
The increased resolution and antialiasing means that we need to render 15.1875 times more pixels, which would normally increase the render time to 11.4 days, plus a bit more for the two extra key frames at the end. However at higher resolutions the guessing works even better so this enhanced quality movie actually took less than 8 days of compute time.
The elapsed time was a bit higher than the render time because I was rendering this on my laptop, which I use for many other tasks. I left the render running when I was doing e-mail, web surfing, and writing this blog post (so FX was running a bit more slowly) but I had to pause it, and stop the clock, when I was taking the bus to work. If I’d done the calculations on a dedicated desktop machine like the one I have at work (six cores and higher frequencies) it could have been rendered in half the time.
8 days. 720p of antialiased Mandelbrot beauty. Thanks to Nosro for finding the location, and sharing its coordinates.
But enough talk. The proof is in the videos. Enjoy.
Original 640×480 non-antialiased zoom movie:
Sorry to inform, but that wasn’t the deepest zoom movie to date. The deepest zoom movie I’ve ever seen which actually impresses is 10E-1000 and it was posted on youtube a month earlier. It claims to be fully 1280x720p but I believe there are way fewer pixels rendered than the video implies. It’s still a very beautiful zoom with a gorgeous color palette, but sadly was made with Mathmatica 7 and not Fractal Extreme.
http://www.youtube.com/watch?v=1sSm53Q9Jws
I’ve done worse 😉 :
YT /watch?v=Qb6r5OhDuNI
The rendering’s a bit modest — keyframe res: 425×325 without antialiasing — but the hardware I used at the time was very modest — CPU 32-bit 2×1.33GHz — so I had to compromise. My small band of subscribers seems to have loved it though.
And, correct, this is nothing like the 1E1000 zoom you guys were talking about. I did see that one, though.
Always a fan.
Believe it or not, some people are still rendering zoom movies in Fractint (DOS or 16-bit “dinosaur” Win3.x executable), which is single-threaded and uses only 16-bit integer math, so it’s likely runs 4x slower or worse, than most poorly optimized 32-bit software. I played with it on my old Windows XP rig, and the interface is quite painful to use compared to 32/64-bit Fractal Extreme. I cringe to think of how long people must have waited for some of those earlier zoom videos to get rendered.
Would it be possible to have a similar text file created which allows the number of iterations to be changed in the same way that the zoom speed is changed. Quite a lot of the time I want a crisp outline to an inner ‘beetle’ and need to increase the iterations by several thousand or even the zoom speed on the colour banding (as I don’t like my pictures tooooo stripey!) to get the finished frame looking great, but that makes the earlier frames less colourful.
For about zoom to 10^1000:
Phaumann (user, who render it) render only projection Mercator and works with ITERATION DATA. FX works with BitMap and can’t paint 1x palette cycle! I writes my own program on ASM for getting maximum optimization. My e-mail: [email protected] or [email protected]
Hi Bruce.
As an avid member of fractalforums.com I have been reading (it’s way over my head) about a new way to render the Mandelbrot which allows greater zoom levels and much faster iteration. I’m sure you’ve seen it too.
Would you consider adding that method of generation to Fractal eXtreme as there are a few new programs springing up that utilise this new method but they lack the ease of use of your wonderful program.
Many thanks,
Simon Ferré
That’s the greatest news I’ve heard for some time.
Can’t wait to see your efforts.
I’ll be first in the queue for a new version with those enhancements.
J’ai trouvé ça bien.
Awesome work!! These kind of optimizations are so important and I believe mandelbrot will increase in popularity as we are able to examine it more and more in real time. I am running a Mandelbrot zoom on my 7900K right now. I imagine my code is closer to the original video you are comparing to than yours. 1600 1080p frames is taking about 3 days with a max iteration of 5000. Could you give some details about your max iteration profile along the zoom?