Ray marching
Ray marching is a class of rendering methods for 3D computer graphics where rays are traversed iteratively, effectively dividing each ray into smaller ray segments, sampling some function at each step. For example, in volume ray casting the function would access data points from a 3D scan. In Sphere tracing, the function estimates a distance to step next. Ray marching is also used in physics simulations as an alternative to ray tracing where analytic solutions of the trajectories of light or sound waves are solved. Ray marching for computer graphics often takes advantage of SDFs to determine a maximum safe step-size, while this is less common in physics simulations a similar adaptive step method can be achieved using adaptive Rung-Kutta methods.
Distance-aided ray marching
Sphere tracing
In sphere tracing,
For simple scenes with basic 3D shapes, ray marching does not have many benefits over ray tracing (which finds intersections without marching through the space). Strengths of SDF ray marching are, for example, when morphing shapes, approximating soft shadows, repetition of geometry, and algorithmically defined scenes.
Signed distance functions exist for many primitive 3D shapes.
Cube-assisted
A similar technique to sphere-assisted ray marching, the use of cubes and
Volumetric ray marching
In volumetric ray marching, each ray is traced so that color and/or density can be sampled along the ray and then be combined into a final pixel color. This is often used for example when rendering clouds or 3D medical scans.
Deferred shading
When rendering screen space effects, such as
External links
The 1989 paper "Hypertexture"[4] by Ken Perlin contains an early example of a ray marching method.
References
- ^ Hart, John C. (June 1995), "Sphere Tracing: A Geometric Method for the Antialiased Ray Tracing of Implicit Surfaces" (PDF), The Visual Computer
- ^ Quilez, Inigo. "3D distance functions". Inigo Quilez. Retrieved 2022-07-08.
- ^ Hart, John C.; Sandin, Daniel J.; Kauffman, Louis H. (July 1989), "Ray Tracing Deterministic 3-D Fractals" (PDF), Computer Graphics
- ^ Perlin, Ken (July 1989), "Hypertexture" (PDF), Computer Graphics