Logo by fractalwizz - Contribute your own Logo!


it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
Welcome, Guest. Please login or register. October 28, 2020, 06:35:21 PM

Login with username, password and session length

The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

Pages: [1]   Go Down
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Mandelbulber v2 - 2.12 - OpenCL rendering engines  (Read 5588 times)
0 Members and 1 Guest are viewing this topic.
Fractal Iambus
Posts: 895

« on: November 16, 2017, 07:12:44 PM »

Mandelbulber v2 2.12

Free download (executables for win64, osx and sorce code for linux): http://sourceforge.net/projects/mandelbulber/
official FB group: https://www.facebook.com/groups/mandelbulber/

This is first official release of Mandelbulber program with OpenCL rendering engines which uses graphics card computation capabilities. Most of rendering features available in CPU rendering engine are implemented in OpenCL code.
Thanks to zebastian's magic php scripts there was possible to auto-generate OpenCL code for all existing fractal formulas. Appearance of images rendered using GPU and CPU in most of cases is the same (with some limitations listed below)
However there is still list of features which still only work on CPU (will be implemented in next versions):

- only material #1 is used
- texture mapping (including background)
- primitive objects
- HDR blur
- stereoscopic images
- NetRender
- boolean operators
- support for multiple GPUs
- voxel / mesh export
- anti-aliasing
- limited calculation accuracy to single precision (CPU uses double precision)

To enable OpenCL in Mandelbulber you need to open Preferences dialog and enable it on OpenCL tab. In this window you can select graphics card which you want to use for computation.

Some numbers:
- lines of OpenCL code in rendering engines: 6255
- lines of OpenCL code in fractal formulas: 14802
- 961 commits on GitHub since release 2.11
- 2 new members in Mandelbulber Team

Big Thanks to many users of Mandelbulber which help me testing alpha releases.

New in 2.12:

- OpenCL: Added listing of available OpenCL platforms and devices
- OpenCL: Added querying of OpenCL platforms and devices properties
- OpenCL: Added selection of OpenCL platform and device in Preferences dialog
- OpenCL: Added populateOpenCL.php to autogenerate some OpenCL header files
- OpenCL: populateUiInformation.php autogenerate OpenCL fractal formula code based on C++ code
- OpenCL: Converted all fractal formulas to OpenCL code. Formulas are stored in formula/opencl folder
- OpenCL: Fractal formulas chosen are loaded as separate files
- OpenCL: Applied hybrid sequence to ComputeFractal()
- OpenCL: Added distance estimation functions (logarithmic, linear, pseudoKleinian)
- OpenCL: Added deltaDE distance estimation algorithm
- OpenCL: Added macros to call all fractal formulas in iteration loop according to hybrid sequence
- OpenCL: Added Julia mode
- OpenCL: Implemented detailLevel, iterThreshMode, interiorMode, smoothness
- OpenCL: Added rendering engines:
  * fast - very simple and fast shader. No effects.
  * limited - most of effects, except reflections and refractions
  * full - with branched ray marching - all effects
- OpenCL: Implemented usage of material #1
- OpenCL: Added shader for angle of incidence of lights
- OpenCL: Added soft shadows for main light source
- OpenCL: Added specular reflections
- OpenCL: Added all coloring functions
- OpenCL: Added background shader (excluding textured background)
- OpenCL: Added "Fast Ambient Occlusion" shader
- OpenCL: Added ambient occlusion with "multiple rays with light map"
- OpenCL: Added "slow" calculation of normal vectors
- OpenCL: Added Screen Space Ambient Occulsion (SSAO)
- OpenCL: Added shaders for auxiliary light sources and random lights
- OpenCL: Added "glow" effect
- OpenCL: Added "visible lights" effect
- OpenCL: Added "volumetric lights" effect
- OpenCL: Added "iteration fog" effect
- OpenCL: Added all perspective types to opencl code (three point, equirectangular, fish-eye, fulldome)
- OpenCL: Added Monte Carlo DOF effect with statistical noise control
- OpenCL: Added custom DE step multiplier for volumetric effects
- OpenCL: Added DOF post effect based on Z-Buffer
- OpenCL: Added sweet spot rotation (e.g. needed for full dome)
- OpenCL: Added processing of alpha channel
- OpenCL: Added Box and Spherical folding to OpenCL code (compatibility with Mandelbulber 1.21)
- OpenCL: Rendered tile selection based on center distance ascending. This makes the rendering reveal the image from the center outwards as smoothly as possible
- OpenCL: Kernels are recompiled only when dynamic code is changed
- OpenCL: Added handling of most of OpenCL errors
- OpenCL: Added low limit for distance threshold (1.0e-6) to avoid significant numeric errors
- OpenCL: Added mutex mechanism to protect against concurent rendering using OpenCL by many rendering threads (image, previews, thumbnails)
- OpenCL: Added marker for current pending tile
- OpenCL: CLI mode prepared for rendering with OpenCL
- OpenCL: designed a way to load OpenCL header files on different OpenCL platforms (nVidia, AMD, Intel...)
- OpenCL: Added checking of GPU memory resources and compare with mem limit setting in preferences dialog. If there is not enough memory, effects are rendered using CPU.
- OpenCL: Added BAT script to disable TDR in graphics driver (timeout protection)
- OpenCL: CL_DEVICE_TYPE_ACCELERATOR supported for k1om (x100 Xeon PHI Co-processor)

- Added new fractal formulas:
  * Jos-Kleinian
  * mandelbulbQuat
  * mandelbulbJuliabulb
  * aboxMod12
  * quaternionCubic4d
  * boxFoldBulbPow2V2
  * boxFoldBulbPow2V3
  * aboxMod13
  * boxFoldQuat
  * transfScaleVaryMulti
  * transfBoxFold4dTglad
  * transfSphericalFoldCuboid
  * transfSphericalFoldXYZBias

- Updated fractal formulas
    a record of updates and changes to formulas can be seen in fractal_list.hpp
    a brief summary:
  * with some formulas the vary_scale function has been added, modified or changed,
  * aboxMod2 had major corrections,
  * aux.color has been implemented in more transforms

- Fractals: All fractal formulas converted to 4 dimensional vectors. Backward compatibility has been maintained
- Fractals: Standardized interface for all fractal formula functions
- Fractals: Used function pointers to call functions for fractal formulas. This reduced the complexity of ComputeFractal(). Assignment of fractal functions are made in fractal_list.cpp
- Shaders: Corrected calculation of shaders when "minimum view distance" is reached.
- Shaders: Added soft shadows for auxiliary lights
- Shaders: Added parameter to define color of "fake light sources" (lights based on orbit traps)
- Shaders: Corrected algorithm for orbit trap lights (surface shader)
- Shaders: RayRecursion algorithm partially converted from recursive to iterative - compatible with OpenCL
- Shaders: Optimized multi-ray ambient occlusion in Monte Carlo mode.
- Shaders: Added "DOF_max_radius" parameter to limit maximum blur radius.
- Animation: updated code to use OpenCL rendering
- Animation: increased animation frame range. The old limit was 99999, which is less than an hour of 30 fps frames. The new limit is 9999999, which is just more than 24 hours of an 100 fps video.
- Animation: fixed images deletion of keyframes / flight
- AnimBySound: sound files can be loaded directly from Internet (if specified path starts from http://)
- UI: Added auto-refresh period parameter in preferences dialog
- UI: png, tiff and exr save with progress bar on each channel
- UI: fix png16 and png16alpha save with double .png extension
- UI: formula ui changed most of iteration max from 250 to 999
- UI: standardized color picker for all OS
- UI: Fixed bug: pasting Julia values crashed mandelbulber
- UI: Changed sequence of startup. Now toolbar icons are refreshed after all other initializations of the program.
- UI: Added new color themes for main window
- Queue: Fixed problem with ignored settings of maximum number of threads and thread priority when queue was rendered
- Gamepad: corrected gamepad selection when many devices are connected
- NetRender: display server name in client on connection
- Voxel export: corrected limits (bounding box) for Mesh Export (there was swapped x and y)
- Voxel export: Corrected Mesh Export. Voxel size in each axis has to be unified to calculate correct faces and normal vectors. Now there is only "resolution" parameter which specifies resolution in the longest axis (depends on limits)
- CLI: Added example output path to benchmark. Now the benchmark can optionally put the renders of the example renders into a folder, when this folder has been specified with the -o/--output cli option.
- CLI: Added options for OpenCL configuration
- CLI: Benchmark renders all 300+ examples
- CLI: Benchmark enabled with for OpenCL with 24 hour test timeout.
- CLI: Benchmark generates detailed log output for each rendered example.
- Settings: enumerative fields are saved as names
- Compilation: UI files for fractal formulas moved to formula folder
- Compilation: *.pro files moved to qmake folder
- Compilation: Added mandelbulber-opencl.pro file
- Compilation: MSVC solution updated for OpenCL
- Compilation: MSVC solution includes OpenCL ICD Loader binaries for system compatibility
- Compilation: MSVC solution is fully functional and compatible with Visual Studio 2017
- Compilation: MSVC build is now default for Windows version
- Compilation: Included MSVC redistributable in Build Package
- Compilation: new windows installer (Install Jammer was no longer supported)
- Compilation: Implemented CLEW for mingw builds
- Compilation: added SHARED_DIR_IS_APP_DIR for AppImage. Allows shared data at the same location as the application, when defined at compile time, this can be used for AppImage packaging
- Compilation: updated prepare_for_*.sh scripts
- Compilation: documentation files moved to /usr/share/doc/mandelbulber
- Compilation: CMAKE build refactored and updated.
- Performance: fixed many issues showed by CoverityScan
- Documentation: Added chapter about OpenCL

As always every feedback is appreciated!

Source code repository (GIT, SVN) https://github.com/buddhi1980/mandelbulber2

Posts: 28

« Reply #1 on: November 16, 2017, 11:02:32 PM »

Great work!!

Global Moderator
Fractal Senior
Posts: 1558

« Reply #2 on: November 17, 2017, 02:00:15 AM »

 shocked impressive!

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Forums Newbie
Posts: 4


« Reply #3 on: November 18, 2017, 12:27:58 PM »

Excited about return of OpenCL support, now in V2  :love

Still not sure how to include the opencl header files when compiling from source for Ubuntu Linux.
Do I have to set a compiler flag?  Any guidelines on this ? 
Dzięki !

~# cat /etc/os-release | grep VERSION=
VERSION="16.04.3 LTS (Xenial Xerus)"

~# apt-file list opencl-headers
opencl-headers: /usr/include/CL/cl.h
opencl-headers: /usr/include/CL/cl2.hpp
opencl-headers: /usr/include/CL/cl_d3d10.h
opencl-headers: /usr/include/CL/cl_d3d11.h
opencl-headers: /usr/include/CL/cl_dx9_media_sharing.h
opencl-headers: /usr/include/CL/cl_egl.h
opencl-headers: /usr/include/CL/cl_ext.h
opencl-headers: /usr/include/CL/cl_gl.h
opencl-headers: /usr/include/CL/cl_gl_ext.h
opencl-headers: /usr/include/CL/cl_platform.h
opencl-headers: /usr/include/CL/opencl.h
opencl-headers: /usr/share/doc/opencl-headers/changelog.Debian.gz
opencl-headers: /usr/share/doc/opencl-headers/copyright
opencl-headers: /usr/share/lintian/overrides/opencl-headers

Obviously, I can't just

mandelbulber2-2.12/makefiles# qmake mandelbulber-opencl.pro
Project MESSAGE: Use sndfile library for WAV files
Project MESSAGE: Use OpenCL library
Fractal Iambus
Posts: 895

« Reply #4 on: November 18, 2017, 02:33:05 PM »

There was an error in packaging scripts and there was missing opencl folder in tar.gz file.
Now there is correct file to download on SourceForge (https://sourceforge.net/projects/mandelbulber/files/Mandelbulber%20v2/source%20-%20multiplatform/)

To compile the program is not enough to use
cd makefiles
qmake mandelbulber-opencl.pro
After that you need to run:
make all
then do to parent directory and run install script:
cd ..


Forums Newbie
Posts: 4


« Reply #5 on: November 18, 2017, 03:45:40 PM »

There was an error in packaging scripts and there was missing opencl folder in tar.gz file.
Now there is correct file to download on SourceForge (https://sourceforge.net/projects/mandelbulber/files/Mandelbulber%20v2/source%20-%20multiplatform/)

Compiling from source is working perfectly now. Very easy installation.
Tested OpenCL support on NVIDIA and AMD platforms.
It works super !  thank you post swing

To get the source compiled properly, I had to grab the OpenCL 1.x C++ Bindings Header File from Khronos and add this file (khronos.org/registry/OpenCL/api/2.1/cl.hpp) to /usr/include/CL/
I am not sure if this is just in my situation only, but this header file was not generated and missing in the opencl-headers package of the Ubuntu repo.

« Last Edit: November 19, 2017, 09:41:40 AM by piotrv, Reason: added note to clearify my issue » Logged
Fractal Iambus
Posts: 895

« Reply #6 on: December 05, 2017, 11:04:31 AM »

Mandelbulber 2.12-1 is released. It has following bugfixes:

- OpenCL: fixed bug in shader for auxiliary light sources. There was wrong color of specular reflections
- Documentation: Added missing chapter about OpenCL

Pages: [1]   Go Down
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandelbulber 1.18 - OpenCL Releases « 1 2 3 » Buddhi 37 6765 Last post November 16, 2013, 09:22:05 PM
by Buddhi
OpenCL / GPU animation rendering? Discuss Fractal Forums IteratedLaughter 5 1705 Last post May 22, 2014, 11:46:11 PM
by IteratedLaughter
Mandelbulber 1.21 OpenCL Mandelbulber bartolomiew 4 2767 Last post July 19, 2014, 09:17:27 AM
by the5thfool
OpenCL Mandelbulber 1.21 on my CPU Tutorials mclarekin 0 850 Last post October 30, 2014, 12:46:18 AM
by mclarekin
Mandelbulber 1.21 When to use OpenCL Tutorials mclarekin 0 3650 Last post December 10, 2014, 02:44:35 AM
by mclarekin

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.298 seconds with 29 queries. (Pretty URLs adds 0.013s, 2q)