Logo by Fractal Ken - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. June 21, 2021, 06:47:27 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   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 reinvented  (Read 2312 times)
0 Members and 1 Guest are viewing this topic.
cbuchner1
Fractal Phenom
******
Posts: 443


« on: July 27, 2010, 01:02:35 AM »

Buddhabrot reinvented



http://www.fractalforums.com/index.php?action=gallery;sa=view;id=3037


I added a physics inspired coloring method. Orbit length maps to wavelength which maps to a RGB representation of the spectral color.
EDIT: this was first suggested by kram1032 on the Buddhabrot on GPU thread, thank you very much for the general idea.

And the effect is mindblowing. Did I mention this image rendered in under a minute?
« Last Edit: July 27, 2010, 03:13:11 PM by cbuchner1 » Logged
Schlega
Navigator
*****
Posts: 63


« Reply #1 on: July 27, 2010, 01:29:06 AM »

This is the best Buddhabrot I've seen.Repeating Zooming Self-Silimilar Thumb Up, by Craig
Logged
Lee Oliver
Fractal Fanatic
****
Posts: 314



« Reply #2 on: July 27, 2010, 02:16:04 AM »

That is amazing!  And under a minute as well, wow! the wave
Logged

Kalo’smi lokaksayakrt-pravrddho
Lokan smahartum-iha pravrttah|

rte’pi twam na bhavisyanti sarve
ye’vasthitah pratyanikesu yodhah
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #3 on: July 27, 2010, 10:04:23 AM »

very nice image chris!!  shocked

i'm curious as to how you're handling the incoherent histogram writes; atomics?


(btw perhaps a little credit is due to kram1032 for the idea to map iteration # -> wavelength?)
Logged

cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #4 on: July 27, 2010, 12:51:21 PM »

i'm curious as to how you're handling the incoherent histogram writes; atomics?
(btw perhaps a little credit is due to kram1032 for the idea to map iteration # -> wavelength?)

no atomics used, a few collisions will occur, which may lead to a little loss of brightness at the brightest spots.

kram1032 may have brought it up publicly in the GPU buddhabrot thread first, that's true. But unfortunately for him, it's too obvious to be patented wink
« Last Edit: July 27, 2010, 01:17:37 PM by cbuchner1 » Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #5 on: July 27, 2010, 01:45:30 PM »

That is amazing!  And under a minute as well, wow! the wave

The power of OpenCL/Cuda  cheesy
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #6 on: July 27, 2010, 02:45:21 PM »

Hmm I must say I'm quite disappointed at your attitude; when referring to your (incorrect) implementation you use words like "reinvented" and "mindblowing", but with regard to proper attribution of the idea you implemented, you use "obvious". Who said anything about patenting? I was suggesting a respectful nod; kram is always full of good ideas (I know him from the Indigo renderer forums, as I know you from the nvidia forums), and this is an instance where one has proven quite fruitful - that little bit of credit (for an "obvious" idea) I'm sure you can spare.

About the incorrectness, "a few" collisions is on the order of thousands - as you know GPUs are massively parallel, and can have 20 to 30 thousand threads in flight at once. GPU architecture is entirely based around hiding uncached memory latency by doing things out of order, so it's far from the case with a quadcore CPU where you might produce an incorrect value by "only" a factor of four. Compounding this issue is that the Buddhabrot is a dynamical system, whose attractor is exactly that - an attractor of points, so the collision error is not uniformly spread over the image, it's very concentrated in relatively small and bright regions.
Logged

cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #7 on: July 27, 2010, 03:10:42 PM »

About the incorrectness, "a few" collisions is on the order of thousands - as you know GPUs are massively parallel, and can have 20 to 30 thousand threads in flight at once. GPU architecture is entirely based around hiding uncached memory latency by doing things out of order, so it's far from the case with a quadcore CPU where you might produce an incorrect value by "only" a factor of four. Compounding this issue is that the Buddhabrot is a dynamical system, whose attractor is exactly that - an attractor of points, so the collision error is not uniformly spread over the image, it's very concentrated in relatively small and bright regions.

Global atomics are slower on GPUs by an order of magnitude (except for the very latest generation of Fermi GPUs). That's why I generally avoid them. If you look at some GPU accelerated fractal flame programs (e.g. FLAM 4), you will see that they use the same strategy, i.e. brute force overlapping writes.

To quantify the error on the nVidia architecture, one would have to determine the probability of

a) two threads within the same half-warp issuing a global memory write to the same location at the same time
b) threads on different multiprocessors causing an overlapping global read/modify/write memory transaction to the same location

Although both effects can cause incorrect results, I think the likelyhood of b) is far greater than that of a), but still below any thresholds to leave a visible effect.

I have previously implemented Scott Draves' original Fractal Flame algorithm in CUDA and I carefully tried to avoid write collisions by sorting the contributions by their screen coordinate before applying the contributions in an collision-free manner. The sorting step became the bottleneck of the entire application. So I came to the conclusion that trying to avoid or mitigate write collisions on statistical image generators doesn't bring enough benefits to warrant the additional overhead.

As for the criticism related to attribution of kram's "invention". He did not give an exact formula how to map escape orbit length to wavelength. I experimented with several linear and nonlinear mappings and had to find parameters first that were aesthetically pleasing.  I don't think this wavelength based coloring method will be the end of it. I will try some more and radically different approaches. And I will have to work on better tone mapping and noise reduction.
« Last Edit: July 27, 2010, 03:53:32 PM by cbuchner1 » Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #8 on: July 27, 2010, 03:13:21 PM »

I'll have to side with Lycium on both the attribution and the correctness issue. Neither is catastrophic, but neither should be glossed over.

Good ideas are always worthy of being valued, no matter if I came up with them or somebody else did. (The use of the word "I" here is meant to prompt every reader to project the situation onto the appropriate case.)

Likewise, massively data parallel processors will continue to evolve towards even more parallelism. They might consist not only of more, but also more isolated computational devices, and the collision problems would become noticeable.


I am not saying what you did is bad. I am saying that it can be improved. smiley
Logged
cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #9 on: July 27, 2010, 03:23:59 PM »

I'll have to side with Lycium on both the attribution and the correctness issue. Neither is catastrophic, but neither should be glossed over.
I am not saying what you did is bad. I am saying that it can be improved. smiley

All righty, it was way past midnight when I posted these images and I wanted to go to bed ASAP, so the attribution issue fell a little short.
I've amended the details in the first post.
« Last Edit: July 27, 2010, 03:40:13 PM by cbuchner1 » Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #10 on: July 27, 2010, 05:17:22 PM »

About the incorrectness, "a few" collisions is on the order of thousands - as you know GPUs are massively parallel, and can have 20 to 30 thousand threads in flight at once. GPU architecture is entirely based around hiding uncached memory latency by doing things out of order, so it's far from the case with a quadcore CPU where you might produce an incorrect value by "only" a factor of four. Compounding this issue is that the Buddhabrot is a dynamical system, whose attractor is exactly that - an attractor of points, so the collision error is not uniformly spread over the image, it's very concentrated in relatively small and bright regions.

Considering the results, i think that the "incorrectness" is acceptable if it really speedup the rendering. (and i'm sure it is)
Speed vs accuracy : GPGPU was always on the speed side. (until very recently, it was 32bits only, no ECC, "improper (for scientific use)" floating point implementation for the older card, etc ...)

*hugs*
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« Reply #11 on: July 28, 2010, 02:42:04 AM »

...it's too obvious to be patented wink

Aww, and I was just about to patent it...

This is amazing indeed cheesy
(Dunno why I didn't stop by earlier...)
And you're right, there is quite some red-bias in this one... smiley But it looks great like that anyway smiley
It's very nice how basically the full detail spectrum is included. You can see the ~20iter buddhabrot spikes as bluegreen for instance smiley
(Actually surprising... shouldn't that rather be at the other end of the spectrum? Or did you invert it, giving low period frequencies high spectral frequencies and vice versa?)
« Last Edit: July 28, 2010, 02:48:15 AM by kram1032 » Logged
cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #12 on: July 28, 2010, 03:05:32 AM »

Aww, and I was just about to patent it...

An important point to remember: File the patent first, only then it is safe to publish. wink

And you're right, there is quite some red-bias in this one... smiley But it looks great like that anyway smiley
It's very nice how basically the full detail spectrum is included. You can see the ~20iter buddhabrot spikes as bluegreen for instance smiley
(Actually surprising... shouldn't that rather be at the other end of the spectrum? Or did you invert it, giving low period frequencies high spectral frequencies and vice versa?)

default parameters were chosen like this
--maxR=380 --maxG=200 --maxB=1000

resulting wavelength is maxR + length of orbit* 400/maxG
the highest computed iteration count is maxB

in case you're wondering about the strange naming  (maxR, maxG, maxB), they are simply re-used from the traditional iteration cutoff based coloring method.



So we're coming in from short wavelengths at low iterations (380nm=maxR), and go towards longer wavelengths at high iteration counts. With my choice of parameters, the infrared (780nm) would be reached at 200 (=maxG) iterations already, in practice red color tones are reached much earlier (maybe around ~130 iterations)! That explains the red bias as you zoom in. The full view doesn't look that red at all - see attachment. My zoom was into the leftmost minibulb that is directly attached to the period-2 bulb. Eww the compression artefacts on this screenshot are ugly.



* buddha_wavelength_full.jpg (15.04 KB, 640x481 - viewed 275 times.)
« Last Edit: July 28, 2010, 03:21:27 AM by cbuchner1 » Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #13 on: July 28, 2010, 09:35:16 AM »

Eww the compression artefacts on this screenshot are ugly.

- Don't use the windows capture tool. (insane compression)
- use the good old print screen key on your keyboard (and save it with the gimp, good and free)
- host in on Amazon S3 (cost me $0.03/month and i still have 930MB to use before it cost me $0.152/month  cheesy )
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« Reply #14 on: July 28, 2010, 02:57:46 PM »

I was hosting images on photobucked for free and it worked pretty well.
My images are still active, there... although I wasn't on my account for ages.
So, that works too smiley

nice full view smiley
So this basically means, the closer you get, the more red it becomes... (as the overall view actually looks purple, which is at the other end of the visible spectrum...)

I guess, this wont work by far as good but maybe you could let the spectrum basically repeat in higher frequencies... - somewhat like a musical octave, where a is red and h is purple and then, the next octave starts with a = red again....
The visible spectrum of light is too narrow to be interpreted in octaves... However, if it was, I'm somehow pretty sure, we would see in octaves as well smiley There would be many kinds of red, orange, yellow, green, cyan, blue, indigo, purple, rather than just one with shades of it.

Maybe just put a power-ish distribution above that, making the visible spectrum the strongest and halfing the intensity of every octave before and after that, successively...

I release this idea under an open source licence with share-alike attribute cheesy
« Last Edit: July 28, 2010, 02:59:46 PM by kram1032 » Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3D Buddhabrot 3D Fractal Generation David Makin 1 2694 Last post January 12, 2008, 02:36:31 PM
by twinbee
buddhabrot in fortran :) Programming « 1 2 » ker2x 21 5168 Last post June 10, 2010, 03:26:00 AM
by decayer
BuddhaBrot! Images Showcase (Rate My Fractal) « 1 2 » emmmile 17 2899 Last post June 22, 2010, 11:53:15 PM
by Nahee_Enterprises
Buddhabrot Images Showcase (Rate My Fractal) Well En Taoed 3 1433 Last post July 30, 2010, 04:20:28 PM
by Wel lEnTaoed
Detail view of "Buddhabrot reinvented" Images Showcase (Rate My Fractal) cbuchner1 2 1024 Last post July 27, 2010, 03:12:16 PM
by cbuchner1

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.126 seconds with 24 queries. (Pretty URLs adds 0.008s, 2q)