More Tessellated Terrain

Just a quick note about some small changes I made to the terrain object in Haze. Originally its initialization code just created a single quad made of two triangles with an index buffer in the form {0, 1, 2, 2, 3, 0}. Since then I have updated the constructor to take in an initial size value (int) that sets the number of quads (width and height) in the x and z direction to create. The initialize method now just generates the starting geometry in a loop and sends quad indexes in instead of triangles {0, 1, 2, 3}

The major effect this has on things is that now there can be a single vertex for every single texel passed in as a height map. Since the max tessellation level is 64, we only have to make an 8×8 initial grid to get a full 512×512 tessellated terrain. This opens up other doors as well for things like levels of detail using different tessellation in different quads based on camera distance or view angle. Next up is to get some texture mapping going and see how much I can make things look like real terrain.

I might start with standard splatting techniques, but I’d really like to have the video card generate some of the splat “stencils” based on heights on the whole map (snowy parts at the highest points, less snow on steep slopes, etc.) We’ll see what happens.

Leave a Reply

You must be logged in to post a comment.

Do NOT follow this link or you will be banned from the site!