Terrain tiles

Started by
1 comment, last by jm_hewitt 19 years, 4 months ago
I'm currently doing a terrain engine that can be devided up into tiles, each tile is made up of several 1, 4, 16, etc subdivissions depeneding on it's distance from the camera. I'm thinking of 2 diffrent ways I coule be drawing them via vertex arrays:

+---+---+---+---+
|  /|  /|  /|  /|
| / | / | / | / |
|/  |/  |/  |/  |
+---+---+---+---+
|  /|  /|  /|  /|
| / | / | / | / |
|/  |/  |/  |/  |
+---+---+---+---+
etc
or

+---+---+---+---+
|\  |  /|\  |  /|
| \ | / | \ | / |
|  \|/  |  \|/  |
+---+---+---+---+
|  /|\  |  /|\  |
| / | \ | / | \ |
|/  |  \|/  |  \|
+---+---+---+---+
The first way would be really easy to use triangle strips to draw but i think wouldnt look as good for smooth hills. The second i think would look better but would be slower as I couldn't use triangle strips/fans (using front face culling). Any suggestions on which way (or a diffrent way) to go?
Advertisement
Triangle strips don't give you much benefit on most modern graphics cards. The extra memory bandwidth of a list compared to a strip is the only difference, and that's not much -- the vertex cache makes sure that the actual vertex data is transformed only once for a single vertex the same for strips and lists.
enum Bool { True, False, FileNotFound };
I've heard it depends on the card. ATI cards prefer lists while nVidia still gives you a boost with strips. I could be misinformed but that was the last I heard on the matter.

For my terrain, I just recently moved to Isometric Tiling (I dont know how to make this a link, sorry.) http://graphics.cs.brown.edu/games/IsoHeightfield/

THis provides better looking terrain... you have

______________
|\/\/\/\/\/\/\/\/|
------------------
|/\/\/\/\/\/\/\/\|
------------------
|\/\/\/\/\/\/\/\/|
------------------
|/\/\/\/\/\/\/\/\|
------------------

instead of the other one. I am in OpenGL so prefer nVidia anyway and stripping requires an extra null triangle to connect rows every 2 rows for me.

This topic is closed to new replies.

Advertisement