Skip to main content
gamedev.net
🔒 Locked

Terrain rendering performance

Started by fosh Mar 18, 2005 at 2:55 AM 2 replies 750+ views
Original Post
fosh
fosh
g'day all. When rendering terrain, that is stored as a regular heightfield, is there any reason to pass vertex data to the card as triangles rather than quads? At the moment, im got a path to render as triangles or render as quads. The quads path runs at about 110fps, and the triangles runs at about 70fps...which about corresponds to what you'd expect the decrease in fps to be based on the change in the number of vertices required for each path. Both are rendered into a display list once, and then called every frame. I realise that you should be able to see a bit of visible difference...breaking each quad into 2 tris obviously allows it to be bent in the middle, but im not seeing much. Are there any other reasons to go with triangles? cheers, Scott
Cygon
Cygon
Internally, only triangles can be rendered, so your quads will eventually be converted to triangles before they are rendered.

You should see some speed gain from vertex caching and batching if you use indexed triangle strips. I'm mainly using Direct3D, but I think to do this in OpenGL you have to create a VBO and somehow set up an index buffer for it.

-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
fosh
fosh
ah, thanks for that!
i totally forgot about triangle strips.
ill give that a shot.
Aiursrage2k
Aiursrage2k
One of the slowest operations in the 3d pipeline is changing the textures, so a very simple optimization would be to sort your data by texture.
Insufficent Information: we need more infromationhttp://staff.samods.org/aiursrage2k/

Topic Locked

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

Sign in to reply to this topic.