Logo by Dinkydau - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 24, 2024, 12:45:17 AM


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]   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: Better DE estimate using orbit traps  (Read 23974 times)
Description: Using orbit traps to address overstepping
0 Members and 4 Guests are viewing this topic.
hobold
Fractal Bachius
*
Posts: 573


« Reply #30 on: February 11, 2010, 12:02:23 AM »

One more thing just occurred to me. The mandelbulb is notorious for the need to scale down the distance estimates derived from the standard 2D Mandelbrot construction. Maybe the instability near the pole is the underlying reason for this. This would mean that the aforementioned polar orbit trap, when done the "right" way (i.e. with more rigorous and more stringent mathematical analysis) could end up accelerating the mandelbulb renderers, because it would replace the global fudge factors that reduce DE everywhere across the board (rather than just in the places where it is really needed). So you would no longer do ten times the number of required steps everywhere, only to still overstep near the polar features.

Dang, I think I need to abandon my voxel based renderer, and play with ray marching instead. :-)
« Last Edit: February 11, 2010, 12:04:37 AM by hobold » Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #31 on: February 13, 2010, 01:50:25 AM »

Hi,

I absolutely agree.
I hope that some day, someone with good math background will study this stuff and give us the right answers. Meanwhile, the tricks I'm giving here really do the job.  whistling and rolling eyes

I was curious about what would give the full DE would give. Because an full analytic formulation is not yet available I've tried the numerical approache to compute the gradient (as described in the famous mandelbulb thread). Of cours, I do the tests on the mandelbulb variant that have the most adverse case: positive Z-component method.

The result without the correction trick:


With the correction trick:


The analytic DE I'm curently using (because it's simple and fast. See post:http://www.fractalforums.com/mandelbulb-implementation/realtime-renderingoptimisations/msg9072/#msg9072) without the correction trick:


With the correction trick:


Humm... maybe the full analytic DE will do the job! if the artifacts are due to the numerical approximations.
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #32 on: February 13, 2010, 03:47:17 PM »

Did you use a cylindrical or a conical orbit trap for these test renders?
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #33 on: February 13, 2010, 05:52:18 PM »

I used cylindrical traps. Have not yet modified it to conical.
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #34 on: February 13, 2010, 06:34:32 PM »

I didn't mean to order you to get to work. :-) I just wanted these experiments to be documented well.

I still don't feel confident about my grasp of whats happening during the computation of the mandelbulb, in particular this whole idea of turning a smooth iteration function into a distance estimate. Nevertheless, I want to wager a guess as to what the "right" correction for pole artifacts would be.

Picture a globe with the standard spherical coordinate grid of latitude and longitude. At the equator, the grid cells are nearly perfect squares. Towards the poles, the grid cells turn rectangular, getting taller and taller. Until eventually, at the pole, the final row of grid cells is triangular, with the pole as the common tip of all triangles.

In the case of the 2d Mandelbrot, where the equations for distance estimation were originally derived, the situation is like an equator everywhere. No poles, no distortions anywhere. This is the assumption that the distance estimator is based on.

I believe the "correct correction" for the Mandelbulb distance estimates would be to shrink them proportionally to the shorter edge of a spherical grid cell at the respective latitude, to compensate for the rectangular distortion. So you would use a conical orbit trap, keeping track of the closest position to a pole. Then compute the latitude of that closest position, and shrink the distance estimate by cos(latitude). With a bit of luck, this compensation of all orbits (not just those that move close to a pole) should remove the need for global downscaling of distance estimates.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #35 on: February 13, 2010, 09:36:43 PM »

I didn't mean to order you to get to work. :-) I just wanted these experiments to be documented well.
LOL  grin
I said so just because I was about to try it.
My Provisional conclusion is that it doesn't make a big difference because the mandelbulb (I'm talking about power 8 mandelbulb) surface is near the radius 1 sphere.

I still don't feel confident about my grasp of whats happening during the computation of the mandelbulb, in particular this whole idea of turning a smooth iteration function into a distance estimate.
The DE formula usually used gives an estimate. It looks to me like the newton root finding method.

You can take a look at this:http://www.evl.uic.edu/hypercomplex/. It's about quaternion julia set BTW.
There is a PDF book with the distance estimate formulas and their proofs. If I've understood well, there exist a "perfect" DE for Mandebrot and connected julia sets (with complex and quaternion) but wich is practically difficult to use. The DE formula usually used (G/G') is an approximation. The DEs for the mandelbulb (and its relatives  smiley) have, to my knowledge, never been proved.

Nevertheless, I want to wager a guess as to what the "right" correction for pole artifacts would be.

Picture a globe with the standard spherical coordinate grid of latitude and longitude. At the equator, the grid cells are nearly perfect squares. Towards the poles, the grid cells turn rectangular, getting taller and taller. Until eventually, at the pole, the final row of grid cells is triangular, with the pole as the common tip of all triangles.

In the case of the 2d Mandelbrot, where the equations for distance estimation were originally derived, the situation is like an equator everywhere. No poles, no distortions anywhere. This is the assumption that the distance estimator is based on.

I believe the "correct correction" for the Mandelbulb distance estimates would be to shrink them proportionally to the shorter edge of a spherical grid cell at the respective latitude, to compensate for the rectangular distortion. So you would use a conical orbit trap, keeping track of the closest position to a pole. Then compute the latitude of that closest position, and shrink the distance estimate by cos(latitude). With a bit of luck, this compensation of all orbits (not just those that move close to a pole) should remove the need for global downscaling of distance estimates.
This makes sens but using cos(latitude) gives me too small estimates. I think that the contribution of each trap should be weighted with a function of the magnitude. Will see what it gives.
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #36 on: February 13, 2010, 11:26:47 PM »

Just to be clear: the cos(latitude) factor should be applied only once per orbit, not once per iteration. Only for the one iteration where the orbit came closest to a pole.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #37 on: February 14, 2010, 05:06:23 PM »

Taking the minimum zi angle or a combination of the zi angles doesn't make a big difference. The important thing here is that we want to do the correction near the rendered surface and to not scaling down the ED far from the actual surface. That's why I multiply the "star" correction term by a function of the estimated distance (yeah! it's like a snake bitting it's tail).
The trouble with using cos(latitude) is that for some zi with the smallest cos(latitude), |zi| may be very big. the region where the correction will occure will be unnecessarily large. I notice (now) that using cylindrical trap instead corrects somehow this situation. We have:
cos(latitude(zi))=sqrt((xi2+yi2)/|zi|2) for the angular trap.
The cylindrical trap is (xi2+yi2)=cos(latitude(zi))2*|zi|2. It also seems that using squared cos(latitude) gives better results.
I'll try to post some pictures to illustrate what happens.

I want to add a comment about orbit traps in this particular case. taking the minimum is not the only choice we have. Moreover, it doesn't give the smoothest results. Some other possible formulas are:
1-product(1-exp(- positive_constant * xi2)), and
1-product(1-1/(xi2/positive_constant+1))

xi is some property of zi.
positive_constant acts on the zone of influence of each xi.

These functions give smooth results. They are some sort of fuzzy minimum.
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #38 on: February 14, 2010, 09:27:33 PM »

Well, one thing I learned is that I really don't understand this orbit trap business. smiley But it's true; distance estimates far from the surface don't really need the correction. Hm ... so maybe the traps should be flattened spheres (ellipsoids) on both poles ... ?
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #39 on: February 15, 2010, 09:18:09 PM »

Don't worry! I understood the orbit traps last november nerd.

Here are two pictures to illustrate what I said in my previous post. The yellow and green areas are where the value (cos²(latitude) or x²+y²) is low:

Cos²(latitude) -squared because it looks better and works better for me-

A closeup:

Cylinder trap:

Closeup:


Edit: These are vertical slices along the x axis
« Last Edit: February 15, 2010, 10:00:49 PM by knighty » Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #40 on: February 15, 2010, 09:26:41 PM »

Hm ... so maybe the traps should be flattened spheres (ellipsoids) on both poles ... ?
Good idea. I'll try it ASAP!

EDIT: wow! works well. Thanks smiley


EDIT2: And you say you dont really understand that busness?   :surprise:
« Last Edit: February 15, 2010, 09:58:44 PM by knighty » Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #41 on: February 16, 2010, 01:37:01 AM »

I guess I have relatively high standard for "to understand" ... let me elaborate. As I mentioned in another thread, I was allowed to enjoy the privilege of a thorough mathematical education. However, my brain does not seem to be a good match for the formal, disciplined, stringent, goal oriented methods in the mathematical toolkit. Don't get me wrong, I love math, there is much beauty in it, and it is a very powerful tool in the hands of a true master.

But I am more of a seeker, a wanderer. I never quite know where I will end up. In fact, I like it not to know where I will end up. That's one of the better ways to encounter surprises. :-)


There is a phrase that is often used as an euphemism for "I don't know what I am talking about". That phrase is: "I have an intuitive approach to <insert topic>". I think that phrase describes me fairly accurately ... including the occasional case where it assumes its euphemistic meaning. :-)

I sometimes have a knack for making good guesses, but then I tend to have a very hard time justifying those guesses with solid theoretical reasoning. But such reasoning is one of the best ways to explain an idea to somebody else. And the ability to explain is, in my book, the one relevant mark to understanding. Only one who really understood something will be able to truly explain it to somebody else. That's my standard.


Glad I guessed right. :-)
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #42 on: February 16, 2010, 01:29:16 PM »

Only one who really understood something will be able to truly explain it to somebody else. That's my standard.
"Ce qui se conçoit bien s'énonce clairement - Et les mots pour le dire arrivent aisément."
"What is conceived well is clearly stated - and the words to say it come easily."
Nicolas Boileau-Despréaux - L'Art poétique (1674)
 smiley
Glad I guessed right. :-)
And thank you for your valuable feedback.
Logged
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #43 on: February 16, 2010, 02:05:12 PM »

And both of you amaze me, great thread, love it!

Good "guessing" hobold!  afro
Logged

hobold
Fractal Bachius
*
Posts: 573


« Reply #44 on: February 16, 2010, 02:29:32 PM »

And thank you for your valuable feedback.
I expect to be rewarded with beautiful images and animations of the intricate Mandelbulb details which were overlooked so far.  angel
Logged
Pages: 1 2 [3]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Heart Shaped Orbit Traps General Discussion Nahee_Enterprises 0 3703 Last post May 18, 2007, 10:30:58 PM
by Nahee_Enterprises
Mandelbulb, spiral structures & orbit traps Other / General Discussion cytotox 3 14341 Last post December 10, 2010, 06:17:38 AM
by David Makin
Orbit Traps with Image Import UltraFractal fractalrebel 0 2831 Last post March 28, 2011, 08:44:49 PM
by fractalrebel
Convert a Distance Estimate to a Mesh General Discussion eiffie 9 8115 Last post October 11, 2011, 05:22:34 PM
by eiffie
Using the Jacobian to estimate distance Programming TruthSerum 7 7158 Last post July 06, 2014, 02:39:12 AM
by David Makin

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.185 seconds with 26 queries. (Pretty URLs adds 0.014s, 2q)