Logo by haltenny - 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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 24, 2024, 03:33:30 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]   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: Help with errors..  (Read 2914 times)
0 Members and 1 Guest are viewing this topic.
eq
Guest
« Reply #15 on: February 04, 2010, 02:09:24 PM »

Sorry for not replying earlier but as I said previously the time I allow myself to work on this is limited wink

Thanks for you solution David, unfortunately for me I can't use array's in my HLSL code which makes your solution very hard to implement.

The problem I have right now is so weird I'm going crazy.
In essence: better quality (i.e less "misses") equals smaller step distances, right?

I.e stepping DE * 0.1 should always gives at least as good results as stepping DE?

This is what I get:



The ray marching code I use is:

bool
hitTest(out float rayDist, float3 rayOrigin, float3 rayDir, float solidThreshold, float intersectionFailDistance)
{
   rayDist = 0.0f;
   [loop] while (rayDist <= intersectionFailDistance){
      float3 testPoint = rayOrigin + rayDir * rayDist;
      float solidDist = estimateMandelbulbDistance(testPoint);
      if (solidDist <= solidThreshold)
         break;
//      solidDist *= 0.1f;
      rayDist += solidDist;
   }
   return rayDist < intersectionFailDistance;
}

Scaling the solidDistance as shown above gives me the problem displayed.

How could that be?
Am I chasing some sort of precision problem here?




Logged
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #16 on: February 04, 2010, 05:32:07 PM »

Have you thresholded the upper and lower limit of the DE function?

Something like:
...
return r * log(r) * 0.5f / (dr + maxThreshold) + solidThreshold * 0.2;

and:
maxThreshold = bailoutR * solidThreshold * 0.01

Or try out better values, but thresholding is essentially, otherwise you are stepping in flat regions, for example beside the star,
direct to infinity!

Correction:
dr is never below 1.0, so maxThreshold should not be necessary.
Your method differs from the ones i knew:
Accumulating dr should result in accumulating inaccuracies in each iteration?
Wondering if this is still working in different areas and with higher iteration counts.

Anyway: Bailout R of 2.0 is too low, i have artefacts just between the minibulbs in the 2D view, i would go
up to 3.0 or more.
« Last Edit: February 05, 2010, 08:11:25 AM by Jesse » Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #17 on: February 04, 2010, 09:23:14 PM »


How could that be?
Am I chasing some sort of precision problem here?


I would think that is the problem - compared to my implimentation your code is missing an important step, in English:

If new step distance<minimum allowed step distance then new step distance = minimum allowed step distance

The minimum allowed step distance to use depends on the resolution/magnification/threshold but generally if using 0.1*DE as the step distance then using 0.1*threshold for the minimum step should work - provided of course that 0.1*threshold is not out of accuracy and actually zero smiley
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
hobold
Fractal Bachius
*
Posts: 573


« Reply #18 on: February 05, 2010, 03:55:13 PM »

Clipping the step distance to a lower bound is not the only alternative. For GPUs and other SIMD machines, you can do:

position += DE + minimum_step;

and save the conditional branch. Or if your renderer is voxel based, you know that there is a lower size limit on the visible details, hence some minimal step size is guaranteed not to introduce arbitrarily large errors (those were introduced already when you sampled the volume).
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #19 on: February 06, 2010, 02:20:28 AM »

Thanks for you solution David, unfortunately for me I can't use array's in my HLSL code which makes your solution very hard to implement.


Is it not possible to use a texture as a modifiable array ? Or are textures read only ?
My knowledge of GPU programming is currently limited - so far all I've done is a 2D Mandelbrot renderer in shader 2 (just as a test on the iPhone).
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
internal server errors Discuss Fractal Forums cKleinhuis 0 1256 Last post February 29, 2012, 03:01:19 PM
by cKleinhuis
2 kinds of errors in Mandelbulb3d 1791 Mandelbulb 3d Mrz00m 8 1665 Last post March 17, 2012, 08:47:25 PM
by Jesse
Errors with ldbl64.dll Kalles Fraktaler Diddy 2 1965 Last post February 16, 2017, 10:01:24 PM
by TheRedshiftRider
help with errors Fragmentarium « 1 2 » clacker 19 1877 Last post May 01, 2017, 05:53:59 PM
by Sabine

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