# NVTriStrip Question..

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

## Recommended Posts

Hello! I'm planning to use the NvTriStrip library to "optimize" my 3D Model: I Do not understand how this library can re-order the indices without any knowledge about the POSITION of the indiced vertices ... Because in the library, you only pass the indices list .... I just wanna understand a little bit, the tool i'm using ... Thanks a lot Clément Vidal

##### Share on other sites
afaik this optimization process only optimizes for vertex caching i.e. the order in which the geometry is processed. since you probably use most vertices more than once in you model it would be good to load every vertex only once - so you basically optimize your topology data in a way that all occurrances of a vertex are in very close to each other in the index array. that way there is a very high chance that the GPU already has the vertex data in it's cache and doesn't need to load it from memory again which in turn results in a speed increase. and as you noticed - this optimization process does not require knowledge of the actual position of the vertex in the coordinate system...

hope that helps and isn't too wrong.

Cheers,
Alex Stockinger

##### Share on other sites
But as it name say, NvTriStrip do not only reorder indices to increase the cache use, it also create triangle Strip from triangle list .... but to create this list, you need to know the position of the vertex ...

I cannot figuredout how this method can achieve such a thing without knowing anything about the localisation of input vertices ...

Clement Vidal

##### Share on other sites
Quote:
 I cannot figuredout how this method can achieve such a thing without knowing anything about the localisation of input vertices ...

Pretend we have 2 triangles that just consist of indices into an array of vertices. i.e. the way Opengl and Directx expects it.

Let triangle a =[0,1,2]
Let triangle b =[1,2,3]

Now without looking at the vertices we can make a tristrip [0,1,2,3], drawing this strip will be equivalent to drawing triange a then triangle b.

##### Share on other sites
Quote:
 Original post by ClementLuminyI cannot figuredout how this method can achieve such a thing without knowing anything about the localisation of input vertices ...

The location of the vertices don't matter. All that matters is how the vertices are connected...this can be gotten by analyzing the triangle list. Using foobarbazqux's example, vertices (1) and (2) could be miles apart or they could overlap, but they still define a common edge between two triangles, and the triangle list shows that.

If you're interested in the underlying algorithms, chances are NvTriStrip is performing basic graph analysis. Wikipedia has a number of good articles on this subject...this is probably a good start.

CM

##### Share on other sites
Yes ok, i understand, you are wright !

So now i will try to use this library !

Thanks again !!
Clément Vidal

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 11
• 28
• 15
• 39
• ### Forum Statistics

• Total Topics
634836
• Total Posts
3019544
×