Let's make a Ray-Marcher [SH17C]

Raymarching of distance field proved super powerful for creating rich images with complex shapes procedurally and interesting efficient lighting effects in a minimal amount of code. Not only the actual content creation code modeling was small, but the actual renderer itself, the whole technical setup to sinthetize images was ridiculously compact comparing to a mesh based rasterizer or raytracer. So, the exercise became really fruitful and I produced 5 images in 2008 alone that I presented to the “4 kilobyte Procedural Image” category of different demo partys across Europe. - inigo quilez

see also

Coding Adventure

caption

Tutorial 1

Tutorial 2

basics of distance functions

Here you will find the distance functions for basic primitives, plus the formulas for combining them together for building more complex shapes, as well as some distortion functions that you can use to shape your objects. Hopefully this will be usefull for those rendering scenes with raymarching. You can see some of the results you can get by using these techniques in the raymarching distance fields article.

Written on January 26, 2019, Last update on September 16, 2024
raytracing shader ray-marching distance intersection