While working on the Really Deep Fractal Zoom Movie – Much Faster project (240 times faster!) several updates were made to Fractal eXtreme in order to improve the creating of zoom movies. These improvements are now available as part of the 2.20 release. The summary of these improvements is:
- A bug related to pixel guessing was fixed. On one test movie this fix gave an overall calculation speedup of over 25%!
- Support for variable speed playback when converting zoom movies to AVI movies was added.
- A bug that would occasionally cause crashes when saving a zoom movie was corrected.
- A bug that would cause images wider than 4,096 pixels to not reload iteration data was fixed.
- A bug that caused failures when creating zoom movies from fractals that were rotated 90 or 270 degrees was fixed.
- The progress meter that appears when rendering a zoom movie has been improved. It is now horizontally sizeable, it has an option to pause rendering, and it has an option to bring up the status window for more details on what is happening.
- The timers that track how much time has been spent rendering an image or a movie now stop counting when your machine goes into hibernation, which makes them a more accurate reflection of the total computing time.
- Statistics about each frame rendered are now saved to a .fxz.log file in the same directory as the movie. This records how long each frame took to calculate, the total number of iterations, the percentage of pixels that were guessed, the precision, and more.
- When you save a zoom movie as an AVI file it is now optional whether the resulting AVI will be played automatically.
- The undo limit in FX was increased from 50 to 500.
As always the latest version of Fractal eXtreme is available at http://www.cygnus-software.com/downloads/downloads.htm.
And now some details…
As was briefly mentioned here a problem was found where one calculation stage was being serialized instead of parallelized. Fractal eXtreme relies heavily on ‘guessing’ of areas of constant iterations in order to improve performance. Sometimes 75-95% of pixels can be guessed and this can give a tremendous performance improvement. However it is important that this process never give incorrect results, so at the end of every frame FX scans over the image to see if any guesses might be wrong. Any guessed pixel that is not surrounded by eight identical pixels is deemed risky and is explicitly calculated.
Due to a logic flaw it turned out that all processors would recalculate the same pixel, and then move on to the next one, almost in lock step. That meant that this phase would run ‘n’ times slower than it should, where ‘n’ is the number of processor threads you have. That’s an 8x slowdown on my laptop, and a 12x slowdown on my work machine.
The slowdown is only on this one phase, but this phase can involve the calculating of enough pixels – especially on high resolution images – that it makes a significant difference. A 25% speedup from this fix was measured on one long movie, and on machines with more threads the speedup would be greater. Actual results will vary significantly depending on the images you are calculating and the number of cores on your machine.
Variable speed playback
When doing deep zooms it is often the case that some parts of the movie are more interesting than others and it can be nice to slow down the movie at these points – or maybe you just want to have artistic control over the pacing of your movies. Rendering zoom movies to AVI at a constant speed and then adjusting the playback speed afterwards is inefficient and leads to a loss of quality. Therefore FX 2.20 lets you control the zoom speed when saving to AVI.
To enable this feature check the Custom zoom check box on the Save as AVI dialog in the zoom movie player:
When this is checked the zoom movie player will look for a file with a .fxz.config extension with the same name and in the same directory as your .fxz file. You just need to create this text file and add appropriate commands. Here is an example .fxz.config file:
# Blank lines or lines that start with ‘#’ are comments.
# Set the starting zoom level.
setZoomLevel = 2.0
# Pause for half a second
holdTime = 0.5
# Accelerate to 2.0 zooms per second. Hold that speed from 4.0 zooms to
# 5.0 zooms. The acceleration will be a smooth (sinusoidal) acceleration
# curve from the current zoom level to fromZoom, and the speed will
# then be held steady until toZoom is reached.
zoomSpeed = 2.0, fromZoom = 4.0, toZoom = 5.0
# Accelerate to 4.0 zooms per second, holding it from 7.0 to 10.0
# zooms. The acceleration happens between zooms 5.0 and 7.0.
zoomSpeed = 4.0, fromZoom = 7.0, toZoom = 10.0
# Decelerate to 0.0 zooms per second, halting at 12.0 zooms.
zoomSpeed = 0.0, fromZoom = 12.0, toZoom = 12.0
# Pause for half a second.
holdTime = 0.5
# Go backwards.
zoomSpeed = -3.5, fromZoom = 6.0, toZoom = 3.0
zoomSpeed = 0.0, fromZoom = 0.5, toZoom = 0.5
When you click OK the Fractal eXtreme movie player looks for this file and parses it. If there are errors they will be reported. Otherwise it will tell you how long the movie will be and then save it to AVI.
In addition to specifying an initial zoom level and pauses you specify periods where the zoom speed is constant. You specify this by saying what speed you want and what zooms you want this speed held between. In-between these periods (such as from about 6 seconds to 9 seconds in the graph below) the movie player smoothly interpolates between those speeds.
A sample movie using the data above can be found here.
Specifying periods of constant zoom-speed with the start/stop times given in zoom levels was found to work best because it makes it easy to say that you want to go slowly from zooms 88.3 to 97.2 where there is some cool detail, and then from zoom 101 to 150 you want to be going full speed.
It is important to leave gaps between the periods of constant zoom speed since otherwise there can’t be smooth interpolation and the results will not be as pleasing.
Note that the speed can go negative, meaning that zooming in and then out as you please is allowed. Just be sure to stop before changing directions, or else the results will be jarring, and when the speed is negative be sure to make toZoom smaller than fromZoom.
The chart above was created in Excel by pasting the data from the .avi.log file that is now created whenever you save a zoom movie as AVI.
We hope that these new features allow the creation of better fractal zoom movies than ever before.