PosterPDF Available

Accelerating Sphere Tracing

Authors:
Accelerating Sphere Tracing
Csaba Bálint
Eötvös Loránd University, Budapest, Hungary
csabix@inf.elte.hu
1. Introduction
Sphere tracing is an efficient algorithm by Hart in [1] used to visualize surfaces defined implicitly
by a distance function. Keinert et al. [2] presented a faster algorithm via relaxation of the original,
and it was later used in Claybook [3] to implement a real-time simulation based computer game. We
proposed [4] a similar modification to sphere tracing that approximates arbitrary smooth surfaces
optimally. Our measurements indicate a 50% performance increase over that of Keinert et al.
2. Sphere Tracing
Let d(p, A)denote the distance from point p
R3to surface AR3. The mapping f:R3R
is a distance function if f(p) = d(p,{f0})
for all pR3, where {f0}={pR3|f(p) =
0}is the represented surface.
The sphere tracing algorithm [1] shoots a ray de-
fined by a pstarting position towards a v,|v|=
1direction and approximates the closest inter-
section with the fdistance function. From
the properties of f, follows that the distance
sized steps never crosses the surface, which is
a unique property to sphere tracing among im-
plicit solvers.
3. Relaxed Sphere Tracing
Relaxed sphere tracing [2] scales up the conser-
vative step size of sphere tracing by a factor of
1 + ω; e.g., 1.6. If the measured distance at the
new sample is too small, so when together with
the previous it does not cover the step size, the
algorithm takes the original distance sized step
instead.
4. Enhanced Step Size
Our enhanced sphere tracing algorithm [4] is based on the idea that around every pR3point one
can draw an unbounding sphere with radius f(p), and this is disjoint from the {f0}surface.
During the tracing algorithm, the consecutive unbounding spheres around the sample points must
intersect, so the algorithm does not skip any intersection. This test is performed in the relaxed
sphere tracing algorithm, and it is part of our enhanced sphere tracing as well. However, the step
size calculation differs allowing for longer leaps.
The step size calculation is built upon the assumption that the approximated surface is flat which
is later relaxed to allow smooth surfaces. The figure above visualizes unbounding spheres of the two
previous ray tracing steps. The next step size and distance from the flat surface can be computed and
used as a good guess. The ω(0,1) parameter allows efficient tracing of locally concave regions.
5. Enhanced Sphere Tracing
Our algorithm calculates the distep size from
two previous steps instead of just one. This
computation means step size can become ever
larger when the ray is distancing from the sur-
face while the chance the algorithm needs to step
back is low. The ω(0,1) can be used to set
the boldness of the algorithm.
In : p
p
p, v
v
vR3ray, |v
v
v|=1, distance fn. f,
relaxation parameter ω(0,1)
Out: t[0,+)distance traveled on the ray
ri1:= 0; ri:= 0; ri+1 := +;
di:= 0; t:= 0;
for i:= 0;i < imax and ri+1 not too small;
i:= i+ 1 do
di:= ri+ω·ri·diri1+ri
di+ri1ri
;
ri+1 := f(p+ (t+di)v);
if di>ri+ri+1 then
di:= ri;
ri+1 := f(p+ (t+di)v);
end
t:= t+di;
ri1:= ri;ri:= ri+1;
end
6. Results
We compared the three sphere trac-
ing variants using our GPU imple-
mentation accessible at cg.elte.hu/
~csabix/publications/EG2018/ on dif-
ferent scenes. We used a metric that
measures the time each algorithm took
to reach a given error. Even though
the construction of a single enhanced
sphere trace step is more expensive
than that of the other two sphere
tracing variants, its faster convergence
rate makes it outperform the relaxed
sphere tracing on every iteration count
up to 1.5 times.
7. Conclusions
We proposed an enhanced sphere tracing algo-
rithm that approximates smooth surfaces opti-
mally. Sphere tracing slows down near the sur-
face usually at flat regions; which explains why
this step size yields better results.
Our results indicate a consistent speedup over
both algorithms, and therefore it is an excellent
candidate to replace the relaxed sphere tracing
in its applications.
Acknowledgement The project has been sup-
ported by the European Union, co-financed by the
European Social Fund (EFOP-3.6.3-VEKOP-
16-2017-00001)
8. References
[1] John C. Hart. Sphere tracing: A geometric
method for the antialiased ray tracing of im-
plicit surfaces. The Visual Computer, 12:527–
545, 1994.
[2] Benjamin Keinert, Henry Schäfer, Johann Ko-
rndörfer, Urs Ganse, and Marc Stamminger. En-
hanced Sphere Tracing. In Smart Tools and
Apps for Graphics. The Eurographics Associa-
tion, 2014.
[3] Sebastian Aaltonen. GPU-based clay simulation
and ray-tracing tech in Claybook. San Francisco,
CA, March 2018. Game Developers Conference.
[4] Csaba Bálint and Gábor Valasek. Accelerating
Sphere Tracing. In EG 2018 - Short Papers. The
Eurographics Association, 2018.
ResearchGate has not been able to resolve any citations for this publication.
Conference Paper
Full-text available
This paper presents two performance improvements on sphere tracing. First, a sphere tracing variant designed to take optimal step sizes near planar surfaces is proposed. We demonstrate how relaxation is used to make this method applicable to sphere tracing arbitrary geometries and compare its performance to classical (by Hart) and relaxed (Keinert et al.) sphere tracing in rendering various scenes. The method is also general in the sense that it can be applied in any scenario that requires the computation of ray-surface intersections. Our second contribution is a multi-resolution rendering strategy that can be used with any sphere tracing variant. By starting from a lower resolution and gradually increasing it, render times can be reduced.
Presentation
Full-text available
This paper presents two performance improvements on sphere tracing. First, a sphere tracing variant designed to take optimal step sizes near planar surfaces is proposed. We demonstrate how relaxation is used to make this method applicable to sphere tracing arbitrary geometries and compare its performance to classical (by Hart) and relaxed (Keinert et al.) sphere tracing in rendering various scenes. The method is also general in the sense that it can be applied in any scenario that requires the computation of ray-surface intersections. Our second contribution is a multi-resolution rendering strategy that can be used with any sphere tracing variant. By starting from a lower resolution and gradually increasing it, render times can be reduced.
Article
Full-text available
Sphere tracing is a new technique for rendering implicit surfaces using geometric distance. Distance-based models are common in computer-aided geometric design and in the modeling of articulated figures. Given a function returning the distance to an object, sphere tracing marches along the ray toward its first intersection in steps guaranteed not to penetrate the implicit surface. Sphere tracing is particularly adept at rendering pathological surfaces. Creased and rough implicit surfaces are defined by functions with discontinuous or undefined derivatives. Current root finding techniques such as L-G surfaces and interval analysis require periodic evaluation of the derivative, and their behavior is dependent on the behavior of the derivative. Sphere tracing requires only a bound on the magnitude of the derivative, robustly avoiding problems Manuscript, July 1994. Recommended for publication: The Visual Computer. 5-70 where the derivative jumps or vanishes. This robustness and scope ...
Conference Paper
In this paper we present several performance and quality enhancements to classical sphere tracing: First, we propose a safe, over-relaxation-based method for accelerating sphere tracing. Second, a method for dynamically preventing self-intersections upon converting signed distance bounds enables controlling precision and rendering performance. In addition, we present a method for significantly accelerating the sphere tracing intersection test for convex objects that are enclosed in convex bounding volumes. We also propose a screen-space metric for the retrieval of a good intersection point candidate, in case sphere tracing does not converge thus increasing rendering quality without sacrificing performance. Finally, discontinuity artifacts common in sphere tracing are reduced using a fixed-point iteration algorithm. We demonstrate complex scenes rendered in real-time with our method. The methods presented in this paper have more universal applicability beyond rendering procedurally generated scenes in real-time and can also be combined with path-tracing-based global illumination solutions.
GPU-based clay simulation and ray-tracing tech in Claybook
  • Sebastian Aaltonen
Sebastian Aaltonen. GPU-based clay simulation and ray-tracing tech in Claybook. San Francisco, CA, March 2018. Game Developers Conference.