Logo by mauxuam - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. November 30, 2025, 11:03:12 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 is grainy  (Read 5972 times)
0 Members and 1 Guest are viewing this topic.
PurpleBlu3s
Alien
***
Posts: 28



« on: March 31, 2011, 04:10:04 AM »

Hi, I've been programming various Mandelbrot related fractals, and I am particularly interested in the Buddhabrot. I have successfully got it working, however the result is fairly grainy and not smooth like it is in every image I've seen it.
http://dl.dropbox.com/u/16319566/buddhabrot.png

That is with 10000 iterations. The graininess is worse with lower iterations. I am colouring simply based on 255*count[ x ][ y ]/maxCount to get a grayscale.

Any advice would be appreciated.

Thanks.
Logged
Softology
Conqueror
*******
Posts: 120


« Reply #1 on: March 31, 2011, 06:52:04 AM »

The Buddhabrot method is notorious for needing a long time to resolve.  Have patience is the best advice.

This may help speed ups if you haven't seen it before
http://www.steckles.com/buddha/

Jason.
Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #2 on: March 31, 2011, 10:24:13 AM »

It looks perfectly normal to me (and i generated thousands of buddhabrot  grin ).

non-grainy buddhabrot can be created, it require a lot of parameters tweaking and many many hours of cpu time.
In my humble opinion, the grain is part of the buddhabrot and it's not a sign of "bad quality".
You'll have the same problem with millions of iteration smiley
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/
PurpleBlu3s
Alien
***
Posts: 28



« Reply #3 on: March 31, 2011, 11:56:42 AM »

Ah, so what sorts of tweaks are to be done? I have no idea how to improve my current method.

How long does a nice looking (non-grainy) buddhabrot usually take to render?

Thanks.
Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #4 on: March 31, 2011, 12:17:57 PM »

for smoother grain. you can use sqrt, to strengthen (is it the right english world?) the low iteration point, and weaken high iteration point.

Please take a look at : https://github.com/ker2x/WinBuddhaOpenCL/blob/master/WinBuddhaOpenCL/BuddhaForm.cs

Code:
colorR = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].R)) / maxSqrtR * 255.0);
colorG = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].G)) / maxSqrtG * 255.0);
colorB = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].B)) / maxSqrtB * 255.0);
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/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #5 on: March 31, 2011, 12:20:18 PM »

if you want a better contropl on lightness/contrast, take a look at :
https://github.com/emmmile/buddha/blob/master/buddha.cpp

less contrast -> less grain
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/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #6 on: March 31, 2011, 12:59:23 PM »

Also, it usually require some hours of cpu time and a good random number generator smiley
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/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #7 on: March 31, 2011, 01:53:13 PM »

ok, i stop spamming and compile a few commons techniques for better rendering of buddhabrot smiley

- You want a low contrast between low iteration point and high iteration point.
- you can use something like sqrt (or log) mapping to weaken high iteration point, or use usual graphic formula to control lightness/contrast/histogram
- you may want to ignore the first iterations of the point you're plotting. eg : instead of plotting from 1 to 100 iteration, you can try something like 50 to 100.
- zoomed buddhabrot are generally nicer and smoother. it's not the usual mandelbrot rendering, a lot of point that are not part of the M-Set are orbiting inside the MSet before escaping.
- the metropolis hastings algorithm is working very well for deep zooming
- green dominated buddhabrot look very dirty (ewww), you may want to weaken the green color. blue are nice but very dark. (blame the human eye which is very sensible in the green wavelength)

About coloured buddhabroth : the usual technic is to have 1 color per iteration
eg :
red min->max : 100->200
green min->max- : 200->300
blue min->max : 300->400

it works well. but you need to be carefull that you will usualy have much more point in the low iteration range than the high one. (in the exemple above, the rendering will be dominated by the red color)

you can also hava gap between colors :
red : 100->200
green : 300 -> 400
blue : 500->600
in the exemple, the ranges below 100, the 200->300, the 400->500 iteration will not be rendered (no color assigned).

you can have overlapping range :
red : 100->1000
green : 250->1000
blue : 500->1000

in this case you will end up with a buddhabroth dominated by black and white. (eg : the 750th iteration will be red + green + blue -> white)

you can "clamp" the points count. (eg : all points above 255 are equal 255. and you divide by 255 instead of "maxCount"). you will have some some kinf of "burned photo" effect.

here is an exemple of buddha generated by buddha++ while i was typing this.
- 6 hours of cpu time
- red : 100 -> 200
- green : 300 -> 400
- blue : 500 -> 600
- magnification : 3750
- location : -0.665000000000000 x 0.580000000000000

original size is : 1920x1005 (open the picture in a new windows, you'll see it with the original size, the forum is limiting the size)

« Last Edit: March 31, 2011, 01:57:06 PM by ker2x » 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/
PurpleBlu3s
Alien
***
Posts: 28



« Reply #8 on: March 31, 2011, 05:00:16 PM »

Thanks for your help. I don't fully follow everything you posted, but I have tried the square root idea, which has improved my Buddhabrot a bit:
http://dl.dropbox.com/u/16319566/buddhabrotsqrt.png
Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #9 on: March 31, 2011, 05:15:07 PM »

Thanks for your help. I don't fully follow everything you posted, but I have tried the square root idea, which has improved my Buddhabrot a bit:
http://dl.dropbox.com/u/16319566/buddhabrotsqrt.png

is it possible to see the source code ? smiley
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/
lkmitch
Fractal Lover
**
Posts: 238



« Reply #10 on: March 31, 2011, 05:29:56 PM »

Another technique with Buddhabrot (and similar type images) is to generate several different copies of the same basic image, each with a different value of the random-number-generator seed, and then average together all of the layers.
Logged
PurpleBlu3s
Alien
***
Posts: 28



« Reply #11 on: March 31, 2011, 05:57:13 PM »

It's written in Java. I've pasted all of the relevant code (I think).
http://dl.dropbox.com/u/16319566/BuddhabrotCode.txt
Logged
PurpleBlu3s
Alien
***
Posts: 28



« Reply #12 on: March 31, 2011, 07:04:35 PM »

I should add that I'm actually not using the random approach for picking z, although that shouldn't matter when I'm iterating over every point anyway?
Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #13 on: March 31, 2011, 09:30:12 PM »

I should add that I'm actually not using the random approach for picking z, although that shouldn't matter when I'm iterating over every point anyway?

That's what i suspected. It's really important !
You draw only 1 orbit per pixel, which is not enough, you need millions and millions of orbits !

here is a good starting point to understand why : https://www.fractalus.com/info/antialias.htm
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/
PurpleBlu3s
Alien
***
Posts: 28



« Reply #14 on: March 31, 2011, 10:36:35 PM »

I should add that I'm actually not using the random approach for picking z, although that shouldn't matter when I'm iterating over every point anyway?

That's what i suspected. It's really important !
You draw only 1 orbit per pixel, which is not enough, you need millions and millions of orbits !

here is a good starting point to understand why : https://www.fractalus.com/info/antialias.htm

:'<

I can vaguely understand why thinking about it - it makes sense.

So, would I then need more count arrays and then take the average for each count[ x ][ y ]?

EDIT: Actually, I've just confused myself, could you please give me a rough pseudocode style outline of the approach I need to take? Thanks for your help so far.
« Last Edit: March 31, 2011, 10:43:16 PM by PurpleBlu3s » 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 4628 Last post January 12, 2008, 02:36:31 PM
by twinbee
BuddhaBrot! Images Showcase (Rate My Fractal) « 1 2 » emmmile 17 8923 Last post June 22, 2010, 11:53:15 PM
by Nahee_Enterprises
Buddhabrot on GPU Programming « 1 2 ... 6 7 » ker2x 97 40329 Last post April 03, 2011, 11:58:16 PM
by ant123
grainy noise Help & Support coldwetnoz 3 354 Last post January 07, 2014, 05:55:01 PM
by tatasz
Apophysis grainy Help & Support ccb 3 513 Last post July 04, 2016, 01:39:59 PM
by lycium

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.269 seconds with 27 queries. (Pretty URLs adds 0.017s, 2q)