Today marks 10 years since I started my YouTube channel.

Back then a video with a resolution of 240p (426×240 pixels) like the following was considered OK.

These days I can upload a 4K video (nine times the vertical and horizontal resolution of that 240p video) and once YouTube puts it through their internal conversion routines it will usually come out looking excellent.

Mitsuba renderer is a free 3D rendering engine created by Wenzel Jakob that creates realistic images like the following.

Wenzel is one of the co-authors of the seminal PBRT book, so he knows his stuff. Mitsuba uses an XML file format for the scene files that you can pass to the renderer as a command line parameter. This makes it easy for me to build a compatible XML file and get Mitsuba to render it each frame.

Here are some sample 4K images created with Visions of Chaos and rendered with Mitsuba using the constant lighting model. Constant lighting means that light is simulated hitting surfaces from all directions evenly. This means there are no shadows, but crevices within structures and corners are shaded darker because of ambient occlusion.

Using Mitsuba really gives clean, nicely shaded results and the examples above only using the most basic Mitsuba lighting/material setups. Mitsuba has handled the multi-gigabyte sized scene files with millions of spheres and/or cubes scenes with ease. All the end user needs to do is download/unzip Mitsuba and point Visions of Chaos to the main executable.

The latest version of Visions of Chaos now includes both a 32-bit and a 64-bit version. You will need to have a 64-bit version of Windows to use the 64-bit version, but if you still use a 32-bit version of Windows then the 32-bit version of Visions of Chaos will continue to work for you. If you are not sure what “bitness” (bititude?) your Windows is, press Windows-Pause and look next to “System type” on the dialog that appears. Both versions are included with the same install exe to avoid confusion and the 64-bit version only installs if you are running 64-bit Windows.

The main advantage of the 64-bit version over the 32-bit is that there is no longer a 3 GB memory limit. As screen sizes have increased the amount of memory that Visions of Chaos requires to render some of its modes at these higher resolutions was hitting the 32 bit application memory limits. 64-bit Visions of Chaos can now use as much memory as you have physically installed in your PC.

At that time I managed to translate some (probably Fortran) LBM source code provided by the now defunct “LB Method” website (here is how LB Method looked around that time). The algorithms worked and did give me some nice results, but there were problems like lack of detail and pulsating colors due to my display routines scaling minimum and maximum velocities to a color palette.

Yesterday I was looking around for some new LBM source code and found Daniel Schroeder‘s LBM page here. Daniel graciously shares the source code for his applet so I was able to convert his main LBM algorithms into something I could use in Visions of Chaos. Many thanks Dan!

Using Dan’s code/algorithms was much faster than my older code. It also allows me to render much more finer detailed fluids without causing the system to blow out. I can push the simulation parameters further. Dan’s method of coloring solved the pulsing colors issue my older code had and includes a really nice way of visualizing the “curl” of the flowing fluid. Tracer particles are also used to follow the velocity of the underlying fluid to give another way of visualizing the fluid flow. Once particles leave the right side of the screen they are buffered up until they fill up and can be reinjected to the left side of the flow. Tracer particles help seeing the vortices easier than shading alone.

With less memory requirements (another plus from Dan’s code) I was able to render some nice 4K resolution LBM flows. This movie must be watched at 4K if possible as the compression of lower resolutions cannot handle displaying the tracer particles.

Once again I have delved into simulating video feedback.

Here is a 4K resolution 60 fps movie with some samples of what the new simulations can do.

This third attempt is fairly close to second version but with a few changes I will explain here.

The main change is being able to order the effects. This was the idea that got me programming version 3. A shuffle button is also provided that randomly orders the effects. Allowing the effect order to be customised gives a lot of new results compared to the first 2 video feedback simulation modes.

Here are some explanations for the various effects.

HSL Flow

Takes a pixel’s RGB values, converts them into HSL values and then uses the HSL values in formulas to select a new pixel color. For example if the pixel is red RGB(255,0,0), then this converts to HSL(0,1,0.5) assuming all HSL values range from 0 to 1. The length formula above is H*360 and the length formula is s*5. So in this case the new pixel value read would be 5 pixels away at the angle 0 degrees. Changing these formulas allows the image to “flow” depending on the colors.

Sharpen

Sharpens the image by blurring the image twice using different algorithms (in my case I use a QuickBlur (Box Blur) and a weighted convolution kernel). The second blur value is subtracted from the first and then using the following formula the target pixel value is found. newr=trunc(r1+amount*(r1-r2))

Blur

Uses a standard gaussian blur.

Blend

Combines the last “frame” and the current frame. Various blend options change how the layers are combined.

Contrast

Standard image contrast setting. Can also be set for negative contrasts. Uses the following formula for each of the RGB values r=r+trunc((r-128)*amount/100)

Brightness

Standard brightness. Increases or decreases the pixel color RGB values.

Noise

Adds a random value to each pixel. Adding a bit of noise can help stop a simulation dying out to a single color.

Rotate

Guess what this does?

Histogram

Uses a histogram of the image to auto-brightness. Can help the image from getting too dark or too light.

Stretch

Zooms the image. Various options determine the algorithm used to zoom the image.

Image Processing

Allows the various image processing functions in Visions of Chaos to be injected into the mix for even more variety.

As always, you can experiment with the new VF3 mode in the latest version of Visions of Chaos.

I would be interested in seeing any unique results you come up with.

For the next version 4 simulation I would like to chain various GLSL shaders together that make the blends, blurs etc. That will allow the user to fully customise the simulation and insert new effects that I did not even consider. Also GLSL for speed. Rendering the above movie frames took days at 4K resolution.

One of the features I have wanted to implement since the earliest versions of Visions of Chaos has been a formula editor and compiler so users can experiment with their own fractal formulas. This has also been requested many times from various users over the years. Now it is finally possible.

Rather than write my own formula parser and compiler I am using the OpenGL Shading Language. GLSL gvies faster results than any compiler I could code by hand and has an existing well documented syntax. The editor is a full color syntax editor with error highlighting.

As long as your graphics card GPU and drivers support OpenGL v4 and above you are good to go. Make sure that you have your video card drivers up to date. Old drivers can lead to poor performance and/or lack of support for new OpenGL features. In the past I have had outdated drivers produce corrupted display outputs and even hang the PC running GLSL shader code. Always make sure your video drivers are up to date.

For an HD image (1920×1080 resolution) a Mandelbrot fractal zoomed in at 19,000,000,000 x magnification took 36 seconds on CPU (Intel i7-4770) vs 6 seconds on GPU (GTX 750 Ti). A 4K Mandelbrot image (3840×2160 resolution) at 12,000,000,000 x magnification took 2 minutes and 3 seconds on CPU (Intel i7-6800) and 2.5 seconds on GPU (GTX 1080). The ability to quickly render 8K res images for dual monitor 4K displays in seconds is really nice. Zooming into a Mandelbrot with minimal delays for image redraws really increases the fluidity of exploration.

So far I have included the following fractal formulas with the new Visions of Chaos. All of these sample images can be clicked to open full 4K resolution images.

Buffalo Fractal Power 2

Buffalo Fractal Power 3

Buffalo Fractal Power 4

Buffalo Fractal Power 5

Burning Ship Fractal Power 2

Burning Ship Fractal Power 3

Burning Ship Fractal Power 4

Burning Ship Fractal Power 5

Celtic Buffalo Fractal Power 4 Mandelbar

Celtic Buffalo Fractal Power 5 Mandelbar

Celtic Burning Ship Fractal Power 4

Celtic Mandelbar Fractal Power 2

Celtic Mandelbrot Fractal Power 2

Celtic Heart Mandelbrot Fractal Power 2

Heart Mandelbrot Fractal Power 2

Lyapunov Fractals

Magnetic Pendulum

Mandelbar (Tricorn) Fractal Power 2

Mandelbar Fractal Power 3

Mandelbar Fractal Power 3 Diagonal

Mandelbar Fractal Power 4

Mandelbar Fractal Power 5 Horizontal

Mandelbar Fractal Power 5 Vertical

Mandelbrot Fractal Power 2

Mandelbrot Fractal Power 3

Mandelbrot Fractal Power 4

Mandelbrot Fractal Power 5

Partial Buffalo Fractal Power 3 Imaginary

Partial Buffalo Fractal Power 3 Real Celtic

Partial Buffalo Fractal Power 4 Imaginary

Partial Burning Ship Fractal Power 3 Imageinary

Partial Burning Ship Fractal Power 3 Real

Partial Burning Ship Fractal Power 4 Imageinary

Partial Burning Ship Fractal Power 4 Real

Partial Burning Ship Fractal Power 5

Partial Burning Ship Fractal Power 5 Mandelbar

Partial Celtic Buffalo Fractal Power 4 Real

Partial Celtic Buffalo Fractal Power 5

Partial Celtic Burning Ship Fractal Power 4 Imaginary

Partial Celtic Burning Ship Fractal Power 4 Real

Partial Celtic Burning Ship Fractal Power 4 Real Mandelbar

Perpendicular Buffalo Fractal Power 2

Perpendicular Burning Ship Fractal Power 2

Perpendicular Celtic Mandelbar Fractal Power 2

Perpendicular Mandelbrot Fractal Power 2

Quasi Burning Ship Fractal Power 3

Quasi Burning Ship Fractal Power 5 Hybrid

Quasi Celtic Heart Mandelbrot Fractal Power 4 Real

Quasi Celtic Heart Mandelbrot Fractal Power 4 False

Quasi Celtic Perpendicular Mandelbrot Fractal Power 4 False

Quasi Celtic Perpendicular Mandelbrot Fractal Power 4 Real

Quasi Heart Mandelbrot Fractal Power 3

Quasi Heart Mandelbrot Fractal Power 4 Real

Quasi Heart Mandelbrot Fractal Power 4 False

Quasi Heart Mandelbrot Fractal Power 5

Quasi Perpendicular Burning Ship Fractal Power 3

Quasi Perpendicular Burning Ship Fractal Power 4 Real

Quasi Perpendicular Celtic Heart Mandelbrot Fractal Power 4 Imaginary

Quasi Perpendicular Heart Mandelbrot Fractal Power 4 Imaginary

Quasi Perpendicular Mandelbrot Fractal Power 4 False

Quasi Perpendicular Mandelbrot Fractal Power 5

A lot of the above formulas came from these summaries stardust4ever created.

All of these new custom fractals are fully zoomable to the limit of double precision floating point variables (around 1,000,000,000,000 magnification in Visions of Chaos). The formula compiler is fully supported for movie scripts so you can make your own movies zooming into these new fractals.

This next sample movie is 4K resolution at 60 fps. Each pixel was supersampled as the average of 4 subpixels. This took only a few hours to render. The resulting Xvid AVI was 30 GB before uploading to YouTube.

So, if you have been waiting to program your own fractal formulas in Visions of Chaos you now can. I look forward to seeing the custom fractal formulas Visions of Chaos users create. If you do not understand the OpenGL shading language you can still have fun with all the default sample fractal formulas above without doing any coding.