Skip to main content
GameDev.net gamedev.net
🔒 Locked

Terrain tiles

Started by skow Dec 16, 2004 at 11:11 AM 1 replies 700+ views
Original Post
skow
skow
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?
hplus0603
hplus0603
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 };
jm_hewitt
jm_hewitt
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.