@muhkuh:
i dont know the technique very good. can you also do terrain deformation ? what about procedural terrain ? or do you have to precalculate everything. what about textures ? can you just have one texture per patch or is texture blending available ?
fastest terrain algorithm for huge landscape
You've got two vertex buffers. One is static for all patches and the other contains heightfield data. I think you can fill the heightfield buffer as you wish. Procecural data should work as well as heightmaps as long as it's fast enough.
Memory consumption is an issue with this technique. For a patch of 129x129 you need 129² + 2*(65² + 33² + 17² + 9²) + 64² +32² + 16² = 33449 vertices with a minimum of 4 bytes per vertex (even more if you want normals) for the geometry mipmaps. Fortunately it's possible to upload only mipmap levels that are required so for a distant patch that you can be sure of being renderd with 9x9 vertices you dont't have to upload the hole 33449.
If you want to modify the terrain you have to upload new height data. If the changes occur quite often you can even use AGP or system memory which will decrease performance of course.
Texturing isn't coverd by this technique. You can just create any texture coordinates you want in the vertex shader and use any pixelshader or the fixed function pipeline. I used two blend 4 textures based on vertex height.
[edited by - muhkuh on June 8, 2004 4:20:23 AM]
Memory consumption is an issue with this technique. For a patch of 129x129 you need 129² + 2*(65² + 33² + 17² + 9²) + 64² +32² + 16² = 33449 vertices with a minimum of 4 bytes per vertex (even more if you want normals) for the geometry mipmaps. Fortunately it's possible to upload only mipmap levels that are required so for a distant patch that you can be sure of being renderd with 9x9 vertices you dont't have to upload the hole 33449.
If you want to modify the terrain you have to upload new height data. If the changes occur quite often you can even use AGP or system memory which will decrease performance of course.
Texturing isn't coverd by this technique. You can just create any texture coordinates you want in the vertex shader and use any pixelshader or the fixed function pipeline. I used two blend 4 textures based on vertex height.
[edited by - muhkuh on June 8, 2004 4:20:23 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement