Logo by wmauzey - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. March 28, 2024, 03:02:59 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] 2 3 4   Go Down
  Print  
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: Buddhabrot Mag(nifier) - A realtime buddhabrot zoomer  (Read 18605 times)
Description: An OpenCL accelerated interactive realtime buddhabrot zoomer
0 Members and 4 Guests are viewing this topic.
Sharkigator
Alien
***
Posts: 23


« on: March 02, 2017, 02:00:35 PM »



So, recently I've been interested in orbit escape time fractals (especially the Buddhabrot).
So I coded a fairly average fractal renderer (which I called Buddhabrot Max), so I could render the Buddhabrot in high resolution for a poster print. (But that's not what this post is about.)
Then I got interested in writing an OpenCL accelerator for it and realized how powerful computers are nowadays. So I started wondering if it was possible to zoom into the Buddhabrot in realtime.
And since I could not find a program which allowed interactive zooming, I decided to program it myself. (And I called it Buddhabrot Mag(nifier))

This is program is currently kind of a proof of concept and therefore has very limited features.
Buddhabrot Mag is in a very early stage, so please don't expect too much.

Features:
  • Realtime zoom!
  • OpenCL accelerated
  • Custom Formula support (Built-in formula editor)
  • Double precision support
  • Range coloring and Palette coloring
  • Orbit Length setting
  • Rendering set-inside (Anti-Buddhabrot)
  • Z0 setting
  • (Tiled) Offline Rendering
  • Curvature Coloring
  • OpenEXR and PNG support
  • Saving and reloading settings

System Requirements:
  • OpenCL >= 1.2
  • OpenCL Extension cl_khr_gl_sharing must be supported.
  • OpenCL image support

Control:
  • Left Mouse Button: Zoom In
  • Right Mouse Button: Zoom Out
  • Middle Mouse Button: Pan/Move


Download: https://sourceforge.net/projects/buddhabrot-max/files/Mag%200.7/BuddhabrotMag_0_7.zip/download
Manual Page / Troubleshooting: https://sourceforge.net/p/buddhabrot-max/manual/Buddhabrot%20Mag/
Sourceforge Project Page: (of both Buddhabrot Max and Mag) https://sourceforge.net/p/buddhabrot-max/


This thread is continued in the new forum: https://fractalforums.org/other/55/buddhabrot-magnifier-a-realtime-buddhabrot-zoomer/384

If it does not work for you, please check the manual page (I set up a little troubleshooting page) or leave a reply here.
Also, if you've got ideas on how to improve it, please tell me.

Thank you!
« Last Edit: September 30, 2017, 11:24:38 AM by Sharkigator, Reason: Moved to new forum. » Logged
Sabine
Fractal Fertilizer
*****
Posts: 373



WWW
« Reply #1 on: March 03, 2017, 08:41:42 AM »

Very nice!  A Beer Cup
Tested on GTX 980Ti, works well
Logged

sabine62.deviantart.com
Chillheimer
Global Moderator
Fractal Schemer
******
Posts: 972


Just another fractal being floating by..


chilli.chillheimer chillheimer
WWW
« Reply #2 on: March 03, 2017, 12:00:25 PM »

Wow!
Thank YOU!

It works fine here and the speed is amazing!
intel core i3770 and amd radeon r9 290 (with open cl adapter thing installed that i don't remember)

The buddhaset has blown my mind since I started exploring it with http://www.fractalforums.com/announcements-and-news/buddhabrotcl-v1-3/
Sadly there is no development there currently. You really raise my hope for a deeper exploration of the buddhaset!

Most important wishes:
-Colours, obviously! Assign different colours according to the number of iterations it takes until a point escapes (I'll shorten this to NIPE for now wink
For a start you could copy the functionality of BuddhabrotCL (If you need help/input, I'll happily provide, just write me a pm or ask specific questions.

Even better Colours? If possible don't only use 3 colours but make use of palettes, spreaded over all NIPE? (though I don't know if this actually will look good.)

-To get some really outstanding pictures we need the possibility to only display certain areas of NIPE. I got the most astounding images filtering out the low values and for example just show NIPE 250.000 to 500.000.
In my understanding, you have to calculate all the NIPEs below anyway, so why not add a "lower limit"-fader, that allows to filter out the low iteration points in real-time, while not throwing them away.

-of course: image export! and in unlimited resolution of course wink At least 15360*8640

-Long term: store all data that has been calculated once, so when zooming to a place you've been before your calculation will only add up. over time this will lead to the most detailed buddhaset-picture ever. next level: upload and combine the data of all users to make this a community project. I'd definitely host that on my server!

-I would love to explore how a full view of the buddhaset would look like if you take only the starting values of a deeply zoomed section of the mset, like a julia-set deep in the seahorse value.
so the possibility to limit the input-starting-point values to a small section of the mset. (if possibleby using copy-paste coordinates from kalles fraktaler)


-->combine mag and max! why keeping these seperate? (probably some programming issues I have never heard of.., excuse my ignorance wink)


many more ideas, but I don't want to drown you - for now wink

Welcome to the forum by the way!


ps, yes I know it's called buddhabrot. but that name sounds so stupid in german, translates to buttered bread... roll eyes - heyyour name from the contact.txt sounds like you know this already.. fellow german?
« Last Edit: March 03, 2017, 12:37:58 PM by Chillheimer » Logged

--- Fractals - add some Chaos to your life and put the world in order. ---
Chillheimer
Global Moderator
Fractal Schemer
******
Posts: 972


Just another fractal being floating by..


chilli.chillheimer chillheimer
WWW
« Reply #3 on: March 03, 2017, 12:19:13 PM »

how the hell are you doing this?!?
deep zooms like this should technically be impossible!  alien
How did you solve that?!!

I've discussed this with user stardust4ever here in the comments https://www.fractal.institute/buddhabrot/

If you really found a solution you deserve some MAJOR credits!!  shocked
This is an absolute game changer!



edit: i notice it becomes pixely/lines when going deeper than e05. stil this is a thousand times deeper than I've been before with buddhabrotcl (that uses gpu as well)... unbelievable!


* Enull5.JPG (75.01 KB, 877x541 - viewed 580 times.)
« Last Edit: March 03, 2017, 12:45:21 PM by Chillheimer » Logged

--- Fractals - add some Chaos to your life and put the world in order. ---
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #4 on: March 03, 2017, 04:03:31 PM »

i notice it becomes pixely/lines when going deeper than e05.

that would be the limit of single-precision floating point
Logged
PieMan597
Conqueror
*******
Posts: 122



WWW
« Reply #5 on: March 04, 2017, 04:04:12 AM »

This program is really cool, thanks!
Logged
Sharkigator
Alien
***
Posts: 23


« Reply #6 on: March 04, 2017, 10:32:58 AM »

A few replies:

-Colours, obviously! Assign different colours according to the number of iterations it takes until a point escapes (I'll shorten this to NIPE for now wink
For a start you could copy the functionality of BuddhabrotCL (If you need help/input, I'll happily provide, just write me a pm or ask specific questions.

Even better Colours? If possible don't only use 3 colours but make use of palettes, spreaded over all NIPE? (though I don't know if this actually will look good.)

-To get some really outstanding pictures we need the possibility to only display certain areas of NIPE. I got the most astounding images filtering out the low values and for example just show NIPE 250.000 to 500.000.
In my understanding, you have to calculate all the NIPEs below anyway, so why not add a "lower limit"-fader, that allows to filter out the low iteration points in real-time, while not throwing them away.
I will soon upload an update, which has simple color support, assigning different Zs to different RGB channels depending on current iteration.
I could try to use a palette based on orbit length, however you will probably be able to see banding or get a loss of dynamic range, since I encode colors as integers (see: https://en.wikipedia.org/wiki/Colour_banding)

Also I could add a "low limit" setting, however it will have to clear the image and restart the rendering, since there is no way of remembering which pixel were drawn at which iteration.

(Also you are talking about very high orbit lengths here, at least for realtime rendering. The current version uses a maximum of 5.000 iterations.)

-of course: image export! and in unlimited resolution of course wink At least 15360*8640

-Long term: store all data that has been calculated once, so when zooming to a place you've been before your calculation will only add up. over time this will lead to the most detailed buddhaset-picture ever. next level: upload and combine the data of all users to make this a community project. I'd definitely host that on my server!
Well, first of all a single image of that resolution would take up more than 2 GiB of memory and the rendering would still take hours, probably even longer if you were to render in tiles.
This is also not my first priority for this project, since it is meant as a realtime zoomer, not an offline renderer. (Buddhabrot Max is meant for stuff like that, though I admit it currently does not perform well when rendering a zoomed part of the Buddhabrot).

Also storing all orbits would cost multiple GiB in a few seconds, so that won't ever be possible. (Unless we get really big and fast SSDs).

-->combine mag and max! why keeping these seperate? (probably some programming issues I have never heard of.., excuse my ignorance wink)
I started Mag as a new project because I did not know if it would actually work, and because it is often easier to work on a small project than on a big one.
Also, I might merge some of their functionality and settings (like all the extra formulas and settings that are available in Max), but they will remain separate projects a one of the is focused on high resolution rendering and the other on realtime zooming and therefore they work differently internally.

-I would love to explore how a full view of the buddhaset would look like if you take only the starting values of a deeply zoomed section of the mset, like a julia-set deep in the seahorse value.
so the possibility to limit the input-starting-point values to a small section of the mset. (if possibleby using copy-paste coordinates from kalles fraktaler)
I've attached an image how it would look if you zoomed in to {-0.8, -0.19} x {-0.67, -0.12}, but zoomed out. (It looks the same, except some parts are brighter than usual.)

ps, yes I know it's called buddhabrot. but that name sounds so stupid in german, translates to buttered bread... roll eyes - heyyour name from the contact.txt sounds like you know this already.. fellow german?
Yes, I am German.

how the hell are you doing this?!?
deep zooms like this should technically be impossible!  alien
How did you solve that?!!
The current implementation works like this:
I've got a list of the "best" orbits. On program start this list is filled with random numbers. (The length of this list can be chosen when starting the program, so the default setting "9" would be 2^9 = 512).
Every orbit in that list is "mutated" 64 times, all these orbits are drawn and assigned a score depending on how much they affect the current image.
So now we've got a list that is 64*512 = 32.768 values long.
Then the orbits with the lowest scores are discarded, so the list only contains the "best" orbits again and it's length is back to 512.

This process is repeated infinitely.

edit: i notice it becomes pixely/lines when going deeper than e05. stil this is a thousand times deeper than I've been before with buddhabrotcl (that uses gpu as well)... unbelievable!
As quaz0r points out, this is indeed the limit of single floats. However, I will update to support double precision (which is slower by a factor of 32x on many GPUs, sadly).


* bounds.jpg (147.91 KB, 1290x963 - viewed 537 times.)
Logged
Sharkigator
Alien
***
Posts: 23


« Reply #7 on: March 04, 2017, 12:11:52 PM »

Updated: Version 0.2
See first post for download link.

Changes:
- Color support
- Improved performance
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #8 on: March 04, 2017, 11:44:16 PM »

I tried to run it in WINE on GNU/Linux/Debian/Stretch, but it failed to start:

Code:
$ wine BuddhabrotMag.exe

Unhandled Exception:
BuddhabrotMax.OpenCl.OpenClException: Code: -1001
  at BuddhabrotMax.OpenCl.OpenClExceptionExtensions.check (Error error) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.GetDeviceInfo () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.MainWindow..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BuddhabrotMag.MainWindow:.ctor ()
  at BuddhabrotMag.EntryProgram.mainWindow () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.EntryProgram.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: BuddhabrotMax.OpenCl.OpenClException: Code: -1001
  at BuddhabrotMax.OpenCl.OpenClExceptionExtensions.check (Error error) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.GetDeviceInfo () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.MainWindow..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BuddhabrotMag.MainWindow:.ctor ()
  at BuddhabrotMag.EntryProgram.mainWindow () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.EntryProgram.Main (System.String[] args) [0x00000] in <filename unknown>:0

I have NVIDIA GTX 550 Ti with proprietary drivers, which I've used with CL/GL sharing in my own code; I also have pocl installed which provides a CPU-based CL implementation without CL/GL sharing - maybe the presence of two platforms is confusing your code?


Re the "how is this possible??" thing, here's an earlier approach which seems similar: http://www.moleculardensity.net/buddhabrot/appendix/1
Logged
Sharkigator
Alien
***
Posts: 23


« Reply #9 on: March 05, 2017, 03:07:03 PM »

It supports multiple platforms.

Code -1001 is CL_PLATFORM_NOT_FOUND_KHR, which is returned by clGetPlatformIDs if "the cl_khr_icd extension is enabled and no platforms are found".
https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetPlatformIDs.html

So you could maybe try to check whether you icd cofiguration is correct?
Or maybe it is some incompatibility cause by WINE.
However I did not expect that it would run on Linux.
Logged
Chillheimer
Global Moderator
Fractal Schemer
******
Posts: 972


Just another fractal being floating by..


chilli.chillheimer chillheimer
WWW
« Reply #10 on: March 06, 2017, 12:30:18 PM »

thanks for explaining in detail!
fascinating method. smiley

looking forward to updates! until then I'll enjoy diving into depths never seen before!
Logged

--- Fractals - add some Chaos to your life and put the world in order. ---
Sharkigator
Alien
***
Posts: 23


« Reply #11 on: March 12, 2017, 05:53:23 PM »

New version released: 0.3
See the first post for download link!

New features:
  • Custom Formula support
  • Double precision support
  • Range coloring and Palette coloring
  • Orbit Length setting
  • Rendering set-inside (Anti-Buddhabrot)
  • Z0 setting

Notes:
You have to select a formula first.
(Some of the formulas don't look too good. Just ignore them then... If you find cool formulas, please tell me!)
After changing settings, click "Apply Settings" to apply them.
Applying settings (even when changing the formula) won't automatically clear the rendering as this may not be your intention. You'll have to do it manually if you want it.
Zooming is not supported when paused.
Clearing happens immediately after unpausing when paused.
Palette size is preset to 16, usually you won't see much of a difference if you set it higher.
You can write you own formulas! See the Formulas folder.
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #12 on: March 13, 2017, 08:59:09 AM »

It supports multiple platforms.

Code -1001 is CL_PLATFORM_NOT_FOUND_KHR, which is returned by clGetPlatformIDs if "the cl_khr_icd extension is enabled and no platforms are found".
https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clGetPlatformIDs.html

So you could maybe try to check whether you icd cofiguration is correct?
Or maybe it is some incompatibility cause by WINE.
However I did not expect that it would run on Linux.

I don't know how properly to test my WINE OpenCL configuration, as evidenced by the above - but installing the 32bit version of wine-development and nvidia-opencl-icd allowed it to get further (this time testing with the 0.3 version):

Code:
claude@frappuccino:~/win/BuddhabrotMag_0.3$ wine-development ./BuddhabrotMag.exe

Unhandled Exception:
System.EntryPointNotFoundException: clGetExtensionFunctionAddressForPlatform
  at (wrapper managed-to-native) BuddhabrotMax.OpenCl.Cl:clGetExtensionFunctionAddressForPlatform (intptr,string)
  at BuddhabrotMax.OpenCl.Cl.getExtensionFunction[clGetGLContextInfoKHR_] (IntPtr platform, System.String name) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.clGetGLContextInfoKHR (IntPtr platform, System.IntPtr[] properties, UInt32 paramName, IntPtr paramValueSize, System.IntPtr[] paramValue, System.IntPtr& paramValueSizeRet) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.GetDeviceInfo (IntPtr glContext, IntPtr hDC, Boolean currentOnly) [0x00000] in <filename unknown>:0
  at BuddhabrotMag.MainWindow..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BuddhabrotMag.MainWindow:.ctor ()
  at BuddhabrotMag.EntryProgram.mainWindow () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.EntryProgram.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: clGetExtensionFunctionAddressForPlatform
  at (wrapper managed-to-native) BuddhabrotMax.OpenCl.Cl:clGetExtensionFunctionAddressForPlatform (intptr,string)
  at BuddhabrotMax.OpenCl.Cl.getExtensionFunction[clGetGLContextInfoKHR_] (IntPtr platform, System.String name) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.clGetGLContextInfoKHR (IntPtr platform, System.IntPtr[] properties, UInt32 paramName, IntPtr paramValueSize, System.IntPtr[] paramValue, System.IntPtr& paramValueSizeRet) [0x00000] in <filename unknown>:0
  at BuddhabrotMax.OpenCl.Cl.GetDeviceInfo (IntPtr glContext, IntPtr hDC, Boolean currentOnly) [0x00000] in <filename unknown>:0
  at BuddhabrotMag.MainWindow..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) BuddhabrotMag.MainWindow:.ctor ()
  at BuddhabrotMag.EntryProgram.mainWindow () [0x00000] in <filename unknown>:0
  at BuddhabrotMag.EntryProgram.Main (System.String[] args) [0x00000] in <filename unknown>:0

Any ideas?
Logged
Sharkigator
Alien
***
Posts: 23


« Reply #13 on: March 13, 2017, 09:49:51 AM »

This could probably happen if you have an OpenCL implementation which does not support OpenCL 1.2.
(clGetExtensionFunctionAddressForPlatform was introduced in 1.2)
Maybe you can check this with clinfo?
Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #14 on: March 13, 2017, 01:02:30 PM »

This could probably happen if you have an OpenCL implementation which does not support OpenCL 1.2.
(clGetExtensionFunctionAddressForPlatform was introduced in 1.2)
Maybe you can check this with clinfo?

mm, tested natively on linux, as I couldn't find a clinfo.exe to download in 2mins of searching, but seems there is some weirdness here - the platform says 1.2 but the device only 1.1:
Code:
  Platform Version                                OpenCL 1.2 CUDA 8.0.0
  Device Version                                  OpenCL 1.1 CUDA

My card is quite old by now though, GeForce GTX 550 Ti.  So I'll give up for now...
Logged
Pages: [1] 2 3 4   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3D Buddhabrot 3D Fractal Generation David Makin 1 3918 Last post January 12, 2008, 02:36:31 PM
by twinbee
Relatively new to here, my Buddhabrot Images Showcase (Rate My Fractal) aluminumstudios 1 4301 Last post February 15, 2010, 11:49:43 AM
by Nahee_Enterprises
BuddhaBrot! Images Showcase (Rate My Fractal) « 1 2 » emmmile 17 7281 Last post June 22, 2010, 11:53:15 PM
by Nahee_Enterprises
Buddhabrot on GPU Programming « 1 2 ... 6 7 » ker2x 97 36712 Last post April 03, 2011, 11:58:16 PM
by ant123
High detail Buddhabrot - "Buddhabrot Echos" Images Showcase (Rate My Fractal) aluminumstudios 4 3410 Last post December 13, 2012, 04:42:29 PM
by tit_toinou

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.257 seconds with 28 queries. (Pretty URLs adds 0.013s, 2q)