Politehnika i dizajn, Vol. 12 No. 3, 2024.
Stručni rad
https://doi.org/10.19279/TVZ.PD.2024-12-3-01
CREATING DIGITAL SCENES USING RAY MARCHING AND SIGNED DISTANCE FUNCTIONS
Patrik Slade
; Tehničko veleučilište u Zagrebu, Vrbik 8, 10000 Zagreb, Hrvatska, Student
Ivan Rajković
; Tehničko veleučilište u Zagrebu, Vrbik 8, 10000 Zagreb, Hrvatska
*
Dinka Radonić
orcid.org/0000-0001-5310-0708
; Tehničko veleučilište u Zagrebu, Vrbik 8, 10000 Zagreb, Hrvatska
*
* Dopisni autor.
Sažetak
This paper explores the basic usage of ray marching and signed distance functions in the rendering of digital scenes. Signed distance functions are mathematical expressions which—given any point in space—will output the shortest distance to an object in the scene. Using ray marching, these functions can also be visualized in various ways. The process of ray marching is based on a step-by-step marching of a virtual ray through the scene, repeatedly sampling the distance function to determine the size of the next step.By modifying the distance functions, numerous object deformations can be achieved quite simply, such as stretching, smooth binary functions, or rendering infinite copies of a given object.All the code was written in the free online program Shadertoy, which itself uses the GLSL programming language and is intended for the creation of both simple and complex shaders. As part of this paper, two demo scenes were created and rendered.
Ključne riječi
ray marching; signed distance functions; rendering; Shadertoy; computer graphics
Hrčak ID:
330605
URI
Datum izdavanja:
14.1.2025.
Posjeta: 60 *