Logo by Jimpan1973 - 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. April 19, 2024, 02:05:13 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
  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: Optimizations for rendering the M-set on GPU?  (Read 1938 times)
0 Members and 1 Guest are viewing this topic.
laser blaster
Iterator
*
Posts: 178


« on: April 14, 2013, 12:12:24 AM »

Hey. So I was wondering if anyone knew of any ways to optimize rendering the Mandelbrot set. For example, maybe there's a way to define an early accept or reject conditional so you don't have to go through as many iterations. One Idea I came across is to compute the exterior distance estimate (probably every 5-10 iterations, for efficiency), and if the distance estimate begins to converge(i.e., the change between successive estimates is small), then you consider it external to the set, and color it according to its distance (so no iteration count coloring). This works because the exterior distance estimates of interior points never converge, they either grow to negative infinity or cycle between values (something like that). Has anyone tried this method? Does it give a sizable performance increase?

The method I mentioned can only optimize exterior points. Does anyone know of a method to optimize interior points by detecting them early? I'm mostly interested in GPU-friendly methods, so anything involving cycle detection or period counting is out of the question.
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #1 on: April 18, 2013, 04:18:29 AM »

Hmm, really? No one knows of any other optimization tricks?
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: April 18, 2013, 08:46:33 AM »

Hi there

You have to consider the trade offs more logik does not neccesarly makes it faster because of the added commands as the gpu method heavily optimizes the repetive things every branch makes it harder for the gpu to apply same algorithm to many pixels so the less dofference in code between pixels the faster it is
correct me if i am wrong

and what you are talking about is the orbit detection the only optimization that i am aware of is to test against zero if your z value at any iteration depth reaches the starting value - normally zero if using mandelbrot method -
You can just leaveyour iteration and consider it as inside
Logged

---

divide and conquer - iterate and rule - chaos is No random!
laser blaster
Iterator
*
Posts: 178


« Reply #3 on: April 18, 2013, 07:24:23 PM »

Yes, you're right, more tests and more branches will slow down the code, so it might be better to keep it simple rather than introduce complex early-exit conditions. It couldn't hurt to try, though.

I'm pretty sure the optimization that I mentioned is not equivalent to orbit detection. However, I am questioning whether it would work at all. I'm thinking that the vast majority of points will reach the bailout radius before their distance estimation converges to a suitable accuracy. I actually got the idea from someone's webpage on the Mandelbrot DE formula. They mentioned that the distance estimator can be used for some sort of early exit optimization, but now I can't find the link and I don't remember exactly how it worked... I don't think my description is quite the same.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: April 18, 2013, 08:15:10 PM »

The pity is that we are dealing with fractals wink in my personal eyes each optimization has drawbacks and could just improve preview rendering like the succsesiverefinement or others lead to visual artifacts
you might try testing against zero but consider that the perfect looping orbits are very rare basically just in the middles of the circles you have such orbits. ,
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #5 on: April 18, 2013, 10:58:07 PM »

I think what was meant by the distance estimation
was that one you have the distance of a point in space to the set you can basically mark a sphere  all points within that sphere could be considered as outside

but this needs storing of results and you dont have that on a gpu
so some kind of buffering would be needed. . .
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Potential Optimizations for DE based Stepping Mandelbulb Implementation hobold 4 3203 Last post February 10, 2010, 09:26:21 PM
by knighty
what to do while rendering? Non-Fractal related Chit-Chat jwm-art 14 3961 Last post January 17, 2011, 11:09:19 PM
by LhoghoNurbs
Optimizations for bulbs other than main cardioid and period-1 bulb? Mandelbrot & Julia Set Levi 2 2855 Last post May 24, 2013, 06:37:57 PM
by Levi
WebGL Mandelbulb with THREE.js flythrough controls (optimizations wanted) Mandelbulb Implementation « 1 2 » itistoday 26 24308 Last post August 12, 2013, 11:47:08 PM
by itistoday
Buddhabrot optimizations Programming « 1 2 » asimes 26 6249 Last post September 01, 2013, 10:01:42 PM
by asimes

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