Mark Sachs (ksleet) wrote,
Mark Sachs

  • Mood:
  • Music:

Victor Hugo once got so mad he threw a baseball through a dog

So I'll explain why this image is so exciting.

The standard way of generating landscapes on a computer is with fractal subdivision. It's actually a very simple concept: you take your basic landscape outline -- a triangle, let's say. A triangle has three points, so you decide what altitude on the landscape those points will have. You can choose it pretty much arbitrarily at this stage. Then, you take the triangle and divide it into four equally sized smaller triangles. In order to do this, you'll need to create three new points, one halfway along each side of the triangle. To generate these new points, you average the height of the points at the ends of the side, and then add a random offset, scaled by the size of the new triangles.

Repeat this over and over, breaking each triangle into smaller ones in turn and applying smaller offsets to them, until you think you have enough detail. The result is a believable, attractive landscape. There are many ways to tweak and adjust the process to create different results, but they all ultimately boil back down to this method. (The reason these landscapes look natural is that they are self-similar fractals -- no matter how much you magnify them, they look about the same -- and that is an attribute shared by many large-scale aspects of our natural environment, such as clouds and coastlines.)

What the image above shows is a different way of generating the surface data for the ray-traced planet I've been working on. Centered inside the sphere, metaphorically speaking, is a polygonal solid with eight triangular sides, like an eight-sided die. Currently each side of the die is painted a different solid color. We take each point on the surface of the sphere, and project it down onto the die. That way, we can map each point on the sphere onto a point on the die. And this die is just made of eight triangles, joined at their sides.

So the next step is/will be to apply fractal subdivision to the triangles, and we can then map that fractal landscape onto the sphere without the severe polar distortion created by simple rectangular texture maps, and with an unlimited yet reasonably efficient level of detail.

This doesn't magically solve all planet-related problems by itself, of course. The downside of fractal landscape generation is the very same self-similarity that gives them their realistic look: all by themselves they exhibit no large-scale features, such as the mountain ranges created in the real world where Earth's crustal plates are driving into each other. I have thought of a promising approach for addressing these issues, but unfortunately this margin is too small to contain it.
Tags: raytracer
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.