strawberry
raymarching distance fields





In 2008 I made some experiments in raymarching again, inspired by distance field optimizatios. I made five images using the technique, where all the objects, textures and lighting was procedural (each image fits in fact in less than 4 kiloytes, rendering engine and presentation included). I made a presentation about the technique, you can find it here.

You can also download a small program that will generate these raymarching images on your hard disk. Actually it generates five images, yet itīs only 13 kilobytes. The trick is that all the images are procedurally generated, or in other words, the raymarched primitives or distance functions are describeed my mathematical formulas, which of course don't consume much space. Get the executable and get the images yourself.

slisesix

This image was the first to be generated with the distance field technique.

It contains some simple geometric primitives like boxes, planes and spheres, but also some more interesting organix shapes (the monster in the center of the image mainly). It's interesting how simple is to blend, twist or deform shapes with this raymarching technique.

It's also interesting to note that both the soft shadows and the ambient occlusion are very very cheap to compute. Actually the cost is quite smaller than that of casting (marching) a single ray. No joke. The distance field gives enought information as to fake these two shading techniques without resorting to montecarlo integration.

I also made a small video of the scene that you can grab here.
organix

Organix was a fast production, and an attempt to not only procedurally generate the geometry and the textures, but also the lighitng.

Everything seen in the image are simple shapes again, but they are distorted with perlin noise functions. Because noise functions are slow to compute, the raymarching process is very slow in this image. It takes around 40 seconds to render in a dualcore laptop at 1280x720 resolution.

Most of the work went in the texturing in fact (and also most of the bytes).

Lighting is fake, in the sense that shadows and ambient occlusion are procedurally painted on the geometry, not computed in any way (not even faked).
leizex

This was a one day production. I wanted to check how it is to directly raymarch a celular pattern (also known as voronoi diagram) in three dimensions. It's a fully procedural voronoi pattern (no LUT used), so itīs very slow.

Again shading is fake, there is no light source, neither there is ambient occlusion or anything. Colors are procedurally asigned to points in space. There is a bit of fog though.




Back


iņigo quilez 2008