Previous | Next --- Slide 44 of 59
Back to Lecture Thumbnails

Something similar to ray tracing is ray marching, which uses a distance field instead of an explicit representation of the geometry.

Rather than performing ray-shape intersection tests, you iteratively march along each ray until you get "close enough" to the surface defined by the distance field. I find ray marching interesting because it allows you to render fractals easily.


@dhua: Ray marching has a lot of nice properties beyond that. In particular, expressing geometry as an SDF in a program favors arithmetic compute vs memory access, which is exactly what hardware likes. Unfortunately, it has the huge problem that it is extremely difficult to put geometry in the required format and as soon as you approach the complexity of typical triangle meshes with current mesh-to-SDF algorithms, you start running into the exact same problems you had with everything else. Ray marching also runs into the problem that for programs expressing complex geometry, the per-warp storage required can be significantly higher than just reading geometry from memory. It also doesn't help that memory-reading ray marching algorithms tend to have a tighter dependence on a read-memory/calculate-next-read-location loop, which destroys prefetching.