Jump to content
  • Advertisement
Sign in to follow this  
Prozak

Whats the deal with Triangle Strips...

This topic is 4854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know questions regarding Triangle Strips and frame rate gains are made often on GameDev, but I wanted the definite take on it all. I've implemented nVidia's NvTriStrip Library to convert my triangle list into a Triangle Strip. (btw, if you want me to write down a small tutorial on how to use this Lib, PM me). At home, on my Radeon 9600 XT, I got a small speed increase in the order of a 9% frames per second increase. At my work computer, which uses a very bland graphics card I got a speed increase of 34%, very noticeable. But, on my laptop I got a 40% speed decrease, a Compaq Presario, very non-game oriented I know. On my dad's laptop, the frame rate remained exactly the same... So, as you can see the results vary wildly, from a 40% speed loss, to a 34% speed gain... Is there any way for me to pre-detect if TriStrips will benefit the game on a certain machine? Is there a formula for this? Does a certain set of extensions have to be present to speed it up, make a diference? And on the latest CPU's, such as the 6800 and 7800 series, does triangle strips still have something to offer, to bring to the table? I know that triangle strips, due to it's format, allow a model's vertices to be transformed only once, and that due to their smaller footprint they travel from local memory to the GPU card faster, but I've also read somewhere that some cards, upon receiving the Triangle Strips expand it into a List, internally... So, what's the deal with Triangle Strips these days?...

Share this post


Link to post
Share on other sites
Advertisement
the increase lies in the reduces amount of data you send

thus you spare a few transformations here an there


in order to gain the largest performance increase you need to work with indexed triangle strips

that way the gfx card can transform the vertex buffer and doesn t have to apply one an the same transformation on duplicate vertices


a good striptification allows strips with approximately 1.1 -1.2 vertices per triangle


have a look at the tunneling algorithm, it allows you to connect several small strips to a large strip thus reduces the api overhead once more

I am working on a tri strip seminar for university so once its finished i can translate it to english and post it but this will take some time maybe half a year til i hold the seminar and i may not publish it before this date

Share this post


Link to post
Share on other sites
How many vertices were you benchmarking with and what were your fps before using tri-strips?

Also for that laptop ehich lossed speed does it use the default drivers? If so have you thought about upgrading the drivers? If has an NVidia or ATI gfx card look into the Omega drivers.

tri-strips simply reduce the amount of transfered data to the card which is obviously a benefit. I don't know anything about that lib you mentioned is it a pre-process? Doing it everyframe can't be good :)

Share this post


Link to post
Share on other sites
dmatter:
The gains and losses I posted above where all relative to the before and after framerate, before being Triangle Lists, and after being Triangle Strips.

My Presario Laptop has all the latest drivers, but it's graphics capabilities still suck.. :(

What are the Omega Drivers? Are those specially for laptops or something?

NvTriStrip is an nVidia Library specially designed to convert Triangle Lists into Triangle Strips. I coded a mesh post-load filter that (after any mesh is loaded, duh!) generates the Triangle Strips for that particular Mesh if it was loaded in Triangle List format, so, it's something that is done only at run time.

Share this post


Link to post
Share on other sites
It's worth noting that without indexing your triangle strips there's also a minor performance increase in that you're only processing one new vertex per triangle instead of three (the other two having been processed as previous triangles). So if you've got complex vertex shaders it's a win.

Share this post


Link to post
Share on other sites
Isn't it pointless to index a tri strip? Verticies in a strip are only ever processed once, so indexing them just means sending more data to the GPU (for the index buffer).

Share this post


Link to post
Share on other sites
prozak: are you setting the cache size correctly when you run nvtristip on the different machines? I daresay the performance drop on your laptop comes from nvtristrip trying to force things in to cache freindly order, even though there's no vertex cache.

superpig: I may be wrong, but I thought it only mattered whether the vertex was in the cache. If that's the case I don't understand how indexing / not indexing makes a difference. Care to enlighten me please? :¬)

Share this post


Link to post
Share on other sites
Superpig's right. The GPU's vertex cache could help for tri lists, but for stips they are only ever going to be processed once anyway. My last comment was more of a question for Basiror.

Share this post


Link to post
Share on other sites
The ideal geometry format is probably a strip ordered indexed list. The post TnL cache will make sure you get the benefits that strips provide. Lists will help make sure that you only have one draw call and don't need degenerate stitching.

Share this post


Link to post
Share on other sites
Quote:
Original post by superpig
It's worth noting that without indexing your triangle strips there's also a minor performance increase in that you're only processing one new vertex per triangle instead of three (the other two having been processed as previous triangles). So if you've got complex vertex shaders it's a win.


Exactly what do you mean by "Indexed"? And what is the diference between indexed and non-indexed?

I guess that instead of having a vertex pool, and Faces, one could just send the vertices over to the card using the same sequence as the TriStrip sequence...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!