Update your bookmarks! This blog is now hosted on http://xoofx.com/blog
Showing posts with label SphereTracing. Show all posts
Showing posts with label SphereTracing. Show all posts

Tuesday, October 13, 2009

Potatro, RayMarching and DistanceFields : a story of SphereTracing


The "Raymarching + Distancefields" is the technique which was most notably used in the majority of 4k intros released in 2009 (and still will have probably a strong influence in 2010). Within Frequency, xt95 introduced this technique thanks to the fantastic work of iq and Systemkit. When wullon asked Frequency to build a little intro to announce the construction of the demoscene.fr web site, xt95 produced a promising first draft of the Potratro from which i could work to improve the overall design, the "isos" forms and the scenes. Yet I had not taken the time to understand the principle of RayMarching + DistanceFields, even if it did not seem to be totally abscond.

Back from the #main 2009, while i looked at the BBS pouet, I came across the following thread: "So, what do remote field equations look like? And how do we solve them?" . Trivial question, but first answers didn't enlighten me about the basic understanding that i had already, but the main principle was still a bit obscure for me. But Ferris then posted a link to an article by John C. Hart, "Sphere tracing: a geometric method for the antialiased ray tracing of implicit surfaces" in 1996 and iq referred to two articles, a first even older John C. Hart, "Ray Tracing Deterministic 3-D Fractals" dating from 1989 and a resumption of the principle in the "Chapter 8. Per-Pixel Displacement Mapping with Distance Functions "of the book GPU from NVidia-Gems2 dating from 2004. Browsing the original article by John C. Hart, everything became clear! This article is an attempt to restore you some of the basic principle of RayMarching + DistanceFields, or more explicitly called Sphere Tracing.