Mark Sachs (ksleet) wrote,
Mark Sachs
ksleet

  • Mood:
  • Music:

Still more, etc.

Wow, I haven't stayed up until 2 AM coding my own stuff in a long time. Like since... forever.



As you can see I went kind of crazy with the lighting. I added the specular term from Phong shading to create a nice specular highlight, and I also added some basic edge detection, first as an experiment to lighten the ocean at the edge of the planet, but it could develop into a decent atmospheric haze sort of thing. I do also need to go back and clean up that code, which is pretty gruesome right now.

Less obvious is that I created a version of the planet which renders an arbitrary texture onto its surface. In this case the fractal landscape is pre-generated and burnt into the texture, which is 360x180 in size (1 pixel == 1 degree) and so the landscape points don't have to be generated at rendering time. The downside is that the resolution breaks down as you zoom in closer -- in fact you can probably notice the pixelation on the sphere's surface even in this tiny image. I suppose there's no royal road to generating the highly detailed surfaces needed to approach the planet closely, though; even in the version of the planet which constantly generates the fractal on the fly, you can see artifacts from the sphere-halving algorithm when you zoom close enough.
Tags: raytracer
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments