Tuesday, November 1, 2011

Hmm, it looks like my scheme for coloring the terrain is working out.

As before, this terrain is based on a three-by-three grid of dots, and we’re blending from rough to smooth terrain going from left to right, but now an additional biome parameter has been added. Going back to front, we’re switching between an arctic, a tundra, and a forest biome. In order to color this efficiently in the pixel shader, I’m using that lookup table: the biomes go from top to bottom, altitude from left to right.

In addition, I’m sampling from a noise texture to add more variation to the borders between biomes and altitude areas. Because this texture goes through linear sampling, it smoothly changes from one point to the next and adds free detail which holds up even upon close inspection. The tiling is obvious if you look closely at the first image, though, so I’m going to have to consider the mechanism for applying it a little more.

What I’m mostly unhappy with right now is the lighting, which is hideous. I’ve never been fond of the lighting you get if you just mindlessly interpolate normals across terrain — it fails especially badly in rough areas, giving the “melted ice cream” look seen in so many games which use heightfield terrain. But if you do flat-shaded lighting instead, as I’m doing now, there’s just an unacceptable amount of noise as well as straight-line and triangular artifacts highlighting seams in the fractal even on smooth terrain. I’m really not sure how I’m going to deal with this.

…Huh. Maybe I don’t even need to light it, if I have really good distance hazing and maybe some faked-up ambient occlusion. Hmm. Need to think about this a bit more.

Notes

  1. mayflystudio posted this