|
barkeg
|
 |
« on: July 25, 2011, 11:31:52 PM » |
|
Hello, I'm new here. I'm just playing arround with the renderer I've written. So 2D fractals and mandelbulb went fine. But when it comes to the mandelbox I don't know at which number I have breake the loop of iterating. Is there something like in the mandelbulbs if magnitude(v)>2 it diverges? I've read something like that if it's a scale 2 fractal it diverges if magnitude(v)>6 and magnitude(v)>2 for fractals with negative scale. But that doesn't work for me. It only rendered a cloud of points. I had to put the limit to 11 (at scale 2) and it worked fine. Is there any relation between the scale and the escape value? (some formula?) Well, here go some pics:   A mandelbulb (cosine version)  And a test with environmentmapping  By the way, very nice forum! It helps me a lot! (and sorry for my english, I hope you understand what I mean)
|
|
|
|
« Last Edit: July 25, 2011, 11:34:33 PM by barkeg »
|
Logged
|
|
|
|
|
|
|
cKleinhuis
|
 |
« Reply #2 on: July 26, 2011, 12:14:50 AM » |
|
but you have to keep in mind that the mandelbox uses a bit greate value for deciding if the formula escapes, the mandelbox is "bigger" than the mandelbrot, i think it covers -6 to 6, so checking for abs(z)>6 should do the trick  as a side note: the bailout condition is always just an "optimisation" or "heuristic" it can be as big as you like, the "inside" points will stay inside, regardless which bailout condition you take, and the others just bailout a little later when using a bigger bailout value, so shifting of colors could occur, so, as a general rule: "it doesnt matter how big your bailout value is, your inside/outside test will yield correct results, but keeping this value as low as possible can dramatically decrease your rendering time!" some coloring algorithms need BIG bailout conditions to look good
|
|
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
|
barkeg
|
 |
« Reply #3 on: July 26, 2011, 01:22:22 AM » |
|
First: Thank you for replying! Second: That's right! Inside points will keep inside but on the other hand points that aren't inside will keep inside with to lower values. I think it depends on the number of iterations too. Some images to show you what happens: All were done with 10 iterations (please ignore the white pixels, its a bug on the shading function) this one is a scale=2 and has a escapa value of abs(z)>6:  scale=2 and abs(z)>11 (I think this is what a scale 2 should look like)  scale=2 abs(z)>30  They are very small but I hope you get an idea. Well, it's true that it has a range of -6 to 6 but I thought to get the corners in it, it would be sqrt(6^2+6^2+6^2)=10.392 which is pretty close to the 11 I used. It's just an idea 
|
|
|
|
« Last Edit: July 29, 2011, 01:02:59 PM by barkeg »
|
Logged
|
|
|
|
|
cKleinhuis
|
 |
« Reply #4 on: July 26, 2011, 11:11:58 AM » |
|
ah yes, its 3d  but all in all you are correct, you can experiment with it 
|
|
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
|
barkeg
|
 |
« Reply #5 on: July 26, 2011, 12:03:01 PM » |
|
Ok, thanks! I'll upload some images when I get it colored.
|
|
|
|
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
     
Posts: 2512
Fragments of the fractal -like the tip of it
|
 |
« Reply #6 on: July 26, 2011, 02:27:18 PM » |
|
Try with 60 iters and bail 1024, it should look perfect 
|
|
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
|
barkeg
|
 |
« Reply #7 on: July 26, 2011, 04:03:15 PM » |
|
iter=60 , bailout=1024  I think it's because it has to much detail so it couldn't show it per pixel. Anyway, I've read somewhere in this forums that 20 is the maximum of iterations to do to look good. But when you zoom in it could be more, so I'm thinking of increasing the iterations when doing more zoom.
|
|
|
|
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
     
Posts: 2512
Fragments of the fractal -like the tip of it
|
 |
« Reply #8 on: July 26, 2011, 05:20:03 PM » |
|
I am not so expert of these details, ask Buddhi or Jesse ... Or look at Buddhi's source code it should be very handy 
|
|
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
|
barkeg
|
 |
« Reply #9 on: July 26, 2011, 10:52:35 PM » |
|
I'll take a look at the source code maybe but I think I'll let it as a number you can input and to change the shape. Thanks,anyway 
|
|
|
|
|
Logged
|
|
|
|
marius
Fractal Lover
 
Posts: 206
|
 |
« Reply #10 on: July 26, 2011, 11:55:58 PM » |
|
I'll take a look at the source code maybe but I think I'll let it as a number you can input and to change the shape. Thanks,anyway  You need to implement some dynamic level of detail, depending on distance and projected on screen error. That's what the raymarchers all do and how you get decent pictures from near to far without getting the pixie dust appearance for high iteration counts like you show earlier in this thread. Yet you want the high iteration count for detail nearby. See for instance http://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/menger.cfg.data/fragment.glsl#215and how m_zoom gets used further down that main() to control the raymarching end condition. In general, the simple .glsl fragments that implement some of the formulae are pretty instructive and self-contained. See source for boxplorer, boxplorer2, fragmentarium, http://fractal.io and various posts all over this forum. Have fun!
|
|
|
|
|
Logged
|
|
|
|
|
barkeg
|
 |
« Reply #11 on: July 27, 2011, 02:40:49 PM » |
|
That was what I had in mind I think I understand the zoom algorithm: -it stops "if (D < m_dist) break;" where m_dist = max(min_dist, m_zoom * totalD) And I think I don't need a bailout when using the distance estimator because a ray actually never "hits" the fractal (tell me when I'm wrong) I'll try to implement it. I was using a simple voxel system looking if each voxel diverges or not (it's so slow!!) Thanks!
|
|
|
|
|
Logged
|
|
|
|
marius
Fractal Lover
 
Posts: 206
|
 |
« Reply #12 on: July 27, 2011, 06:40:44 PM » |
|
That was what I had in mind I think I understand the zoom algorithm: -it stops "if (D < m_dist) break;" where m_dist = max(min_dist, m_zoom * totalD) And I think I don't need a bailout when using the distance estimator because a ray actually never "hits" the fractal (tell me when I'm wrong) Right, a proper distance estimation will give smaller and smaller estimates until you run out of numerical precision. I'll try to implement it. I was using a simple voxel system looking if each voxel diverges or not (it's so slow!!)
With the raymarching approaches you get occlusion culling for free and easy access to lots of raytracing techniques like reflection, refraction, shadowing etc. But you have to compute for every new view. Keeping a voxel cloud of interesting detail in memory is going to be challenging real quick. The distance estimation functions for the various fractals are hard to come up with and kind of magic at first.
|
|
|
|
|
Logged
|
|
|
|
|
barkeg
|
 |
« Reply #13 on: July 27, 2011, 07:02:06 PM » |
|
Oh, i think you were writting when I did another post  I did only compute the voxel wich are visible (for every frame). Well, it's not really a voxel (I began with voxel). I did the same as the distance estimator but with fixed step and when I found something "solid" I did half of the old step backwards and so on. But the fixed step still had to be small to not loose too much detail.
|
|
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
  
Posts: 819
|
 |
« Reply #14 on: August 26, 2011, 01:50:09 AM » |
|
First: Thank you for replying! Second: That's right! Inside points will keep inside but on the other hand points that aren't inside will keep inside with to lower values. I think it depends on the number of iterations too. Some images to show you what happens: All were done with 10 iterations (please ignore the white pixels, its a bug on the shading function) this one is a scale=2 and has a escapa value of abs(z)>6: <Quoted Image Removed> scale=2 and abs(z)>11 (I think this is what a scale 2 should look like) <Quoted Image Removed> scale=2 abs(z)>30 <Quoted Image Removed> They are very small but I hope you get an idea. Well, it's true that it has a range of -6 to 6 but I thought to get the corners in it, it would be sqrt(6^2+6^2+6^2)=10.392 which is pretty close to the 11 I used. It's just an idea  If you are still interrested, here is the post where I have given the formula of the size of the mandelbox.
|
|
|
|
|
Logged
|
|
|
|
|