Title: Enhanced sphere tracing paper Post by: subblue 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 Title: Re: Enhanced sphere tracing paper Post by: cKleinhuis 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 ;) when i find some time i will take a look into it! :evil1: Title: Re: Enhanced sphere tracing paper Post by: eiffie 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. Title: Re: Enhanced sphere tracing paper Post by: eiffie 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 I would estimate about a 10% improvement. This image shows the number of steps as glow... Title: Re: Enhanced sphere tracing paper Post by: cKleinhuis 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 ?!
Title: Re: Enhanced sphere tracing paper Post by: eiffie 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. |