PFE IEEE Ray Marching VS Ray Tracing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Ray Marching VS Ray Tracing

Guillaume Rioual Tanguy Lépine Thomas Quin


Visual Computing Department Visual Computing Department Visual Computing Department
CY TECH CY TECH CY TECH
Cergy, France Cergy, France Cergy, France
rioualguil@eisti.eu lepinetang@eisti.eu quinthomas@eisti.eu

A BSTRACT II. S TATE OF A RT


The field of rendering is evolving at breakneck speed. The first algorithm of Ray Tracing was shown by Arthur
Machines and techniques are more and more sophisticated Appel [4] in 1968. The aim of this Ray Tracing was to cast
to ensure visual quality close to reality. Therefore, various rays from the camera to the objects and from the objects
techniques are at war in a fight for the most qualitative and to the lights. This reproduces a realistic pixelized rendering.
optimized rendering. Since 1979, J. Turner Whitted [5] came up with recursive
Ray Tracing algorithm. This allowed a better precision for
Two technologies stand out: Ray Tracing and Ray color and reflection.
Marching. The question is: which technology performs the
best ? This is the question we will try to answer, while
presenting results comparing the two technologies.

For this, the objective is to produce two similar scenes


using both technologies. The idea is to compare them on
specific criteria, such as quality or rendering time, to realize
which technology is the most efficient.

I. I NTRODUCTION
Image rendering has greatly evolved since its creation,
images are much more advanced and are rendered faster.
This evolution is mainly due to two factors : better hardwares Fig. 1. First Ray Tracer rendering : the light source has been moved relative to
and new algorithms that allow to render more complex image the object. Pixelized rendering, but notice the light going through the opening
at a faster rate. of the object.

An example of such an algorithm would be Ray Marching Ray Marching is newer but a bit different from Ray
[1,3], as its aims is to simulate the flow of light and it is Tracing. While, in Ray Tracing, we look directly at the
more optimized than ray tracing, it allows the render of intersection between the ray and the object, in Ray Marching,
images with complex illumination faster than render using we march along the ray in order to find the object intersection
Ray Tracing. more precisely, thus allowing the rendering of complex object
surfaces. One example of such an a algorithm would be
The idea of Ray Tracing was first thought of during the Sphere Tracing [2].
16th century by Albrecht Dürer. He created a machine called
the Dürer’s door which used a thread attached to the end of a
stylus that an assistant moved in order to draw the contours
of an object.

Nowadays, rendering is used in a lot of fields such as video


games or movies. Those are domains that are close to people,
even more to us, and because the creation and evolution of new
algorithms is heavely linked to the progression of rendering,
Fig. 2. Sphere Tracing principle : adaptative step size where we find the
it makes this subject fascinating. object’s surface at each increment of the ray and move forward along it.
In the scope of this article, we wanted to show a comparison
between Ray Marching and Ray Tracing.
III. E XPERIMENTS AND R ESULTS The Ray Tracing animation hits 3000 frames in about
In this first experiment, we have rendered 2 animations, 60 sec which give us an overall fps of 50, while the Ray
one using Ray Tracing, the other using Ray Marching. This Marching animation does the same in 113 sec for an overall
experiment has for goal to show how Ray Marching compare fps of 26.5.
to Ray Tracing in the worst case. In order to simulate such a
case, we will render a lot of objects close to each other and We see that Ray Tracing render frames much quicker than
we will render only spheres. Ray Marching and without any drops in quality. As such we
can say that for simple objects like spheres, Ray Tracing
By doing that, we are decreasing two of the biggest performs way better than Ray Marching.
advantages of Ray Marching, the adaptative step and the
capacity to find complex object surface easely. In order to Looking at this result we can safely assume that Ray
compare these two animations, we will render 3000 frames Marching doesn’t outperform Ray Tracing in all case and
and then compare rendering time and overall fps. some scenes like the one we made are more easily rendered
by Ray Tracing than by Ray Marching.
The tests were carried out on the shadertoy.com site,
allowing complex shaders to be produced under an intuitive IV. P ERSPECTIVES
interface. The machine used for rendering runs under
Windows, equipped with an RTX 2070 and a Ryzen 5 5600X Since we have seen how Ray Marching compares to Ray
processor. The rendering resolution is 1920x1080px. Tracing in its worst case, the next logic thing to do is to
show how Ray Marching compare to Ray Tracing in its best
In both animations, we didn’t notice any differences in the case, by rendering more complex objects.
quality at which spheres were rendered, sphere boundaries
were found accurately. another interesting thing to do is to render a scene
containing a multitude of objects, both simple and complex
in order to compare Ray Marching to Ray Tracing in a more
common case.

Lastly search for new comparaison method, for example


precisely assessing object rendering quality or implementing
a system of sample and calculate samples rendering time can
further improve the comparaison between ray tracing and ray
marching.

V. C ONCLUSION
After working on the comparaison between Ray Tracing
and Ray Marching, We can be certain about the fact that Ray
Tracing is better than Ray Marching when we work with
simple 3D objects.

When we tried to implement ray tracing with complex 3D


objects, we encountered some troubles, since the equations
we needed to resolve in order to compute the collision with
the ray were particularly difficult. For Ray Marching, it was
not hard at all since we only needed the length to the nearest
object.

If we only cared about the fact taht ray marching is really


Fig. 3. Graphical quality comparison between Ray Tracing (Top) and Ray
Marching (Bottom) at first frame of rendering. easy to implement for complex object then we would that Ray
Marching is far more interesting than Ray Tracing in that case.

R EFERENCES
[1] Jamie Wong, Ray Marching and signed distance functions, jamie-
wong.com, 2016.
[2] Scratchapixel, Rendering Implicit Surfaces and Distance Fields: Sphere
Tracing, scratchapixel.com, 2016.
[3] Michael Walczyk, Ray Marching, michaelwalczyk.com.
[4] A. Appel, Some techniques for shading machine renderings of solids,
1968.
[5] J. Turner Whitted, An Improved Illumination Model for Shaded Display,
1979.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy