Logo by AGUS - 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. July 02, 2022, 05:26:23 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: Enhanced sphere tracing paper  (Read 2793 times)
Description: Could be of interest
0 Members and 1 Guest are viewing this topic.
subblue
Conqueror
*******
Posts: 116



WWW
« on: October 04, 2014, 04:48:04 PM »

This paper discusses some techniques to speed up and improve the quality of sphere tracing ray marchers.
Some interesting snippets in there
http://erleuchtet.org/~cupe/permanent/enhanced_sphere_tracing.pdf

Logged

www.subblue.com - a blog exploring mathematical and generative graphics
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: October 04, 2014, 05:55:53 PM »

nice, thank you for sharing!

ehrm, i did not fully get the idea, it is using screen space to determine larger steps by inducing an error tracking ? something like that, can you give the idea of the paper in one sentence ?
and furthermore have you applied it to any raymarcher yet?  tease

i think the provided raymarching implementation is as easy as copy and paste to any existing script wink when i find some time i will take a look into it!  evil
« Last Edit: October 04, 2014, 06:03:40 PM by cKleinhuis » Logged

---

divide and conquer - iterate and rule - chaos is No random!
eiffie
Guest
« Reply #2 on: November 10, 2014, 07:59:06 PM »

The main improvement suggested in the paper is over stepping. Simply put you can multiply the distance estimate by something like 1.5 and then if the next distance estimate is larger than the amount you over-stepped you know you didn't skip over anything. (because the distance estimate is omni-directional and covers the area you stepped over)
The trick is automating this overstep value depending on if you are approaching or moving away from a surface. I haven't seen an implementation of that yet.
Logged
eiffie
Guest
« Reply #3 on: November 11, 2014, 05:49:54 PM »

Here are some results of testing a simple auto-overstep with the following code:
Code:
float t=0.0;    //total distance
float d=1.0;    //estimated distance
float pd=10.0;//previous estimate
float os=0.0;  //overstep
for(int i=0;i<64;i++){ //march loop
d=DE(ro+rd*t); //get the distance estimate
if(d>os){         //we have NOT stepped over anything
os=d*min(1.0,0.5*d/pd);//calc overstep based on ratio of this step to last
t+=d+os;   //add in the overstep
pd=d;    //save this step length for next calc
}else{ //we HAVE stepped over something
t-=os; //so remove the overstep
pd=100000.0;d=0.1;os=0.0;//and reset so the next overstep will be small
}
if(t>MAX_DIST || d<MIN_DIST)break;
}

I would estimate about a 10% improvement. This image shows the number of steps as glow...


* overstep.jpg (56.81 KB, 720x360 - viewed 529 times.)
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: November 11, 2014, 05:56:59 PM »

so eiffie, nice having you back, i can not spot any visual error, so you confirm speed improvement more or less without losses ?!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
eiffie
Guest
« Reply #5 on: November 11, 2014, 07:01:51 PM »

The method assures nothing is stepped over unless the Distance Estimation function is faulty (returns a non conservative value). If you run out of march steps you get errors as usual. Some pixels may require MORE steps using this method so in that sense you can increase the number of visual errors. I didn't see this in my test.
Nice to be back.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Paper Fractal Other Artforms « 1 2 » combatking0 19 9408 Last post March 20, 2009, 05:03:18 PM
by combatking0
Enhanced rendering using DE - at least on CPU Programming David Makin 10 2138 Last post April 10, 2012, 12:18:48 AM
by Syntopia
Enhanced Ultrafractal Jimmie 1 816 Last post August 03, 2013, 06:17:10 PM
by Furan
Sphere Tracing Shadows Programming asimes 5 814 Last post December 06, 2014, 02:10:54 AM
by mclarekin
Graphene photodetector enhanced by fractal golden snowflake Fractals Applied or in Nature 0Encrypted0 1 999 Last post January 17, 2017, 12:23:13 AM
by mclarekin

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