Original Post
🔒 Locked
Mesh optimize
Advertisement
What people usually mean when they say optimize a mesh they usually optimize the vertex ordering for that mesh. The reason they do this is because the GPU has a cache holding the last few vertices it has operated on. Thus when the same vertex is referenced via the index buffer the GPU doesn't have to run the vertex shader on it again (if it is already in the cache). Since reading from the vertex cache is much faster that running the vertex shader you can get a speedup if you can order your indices such that they reference the same number of vertices within a short period of time. But as always early optimization is the root of all evil. Typically you might get a 10% maybe 20% reduction in frame time so it's not a huge win for the time/cost of writing a good optimizer.
Also, not all cards have the same size of vertex cache. A few years ago it was typical to be able to hold 24 verts. I'm not sure what they size is today, but I can't imagine it being much different. It's one of those areas like bandwidth that hasn't improved much over the years. But what this means is that if you optimize a mesh for a 24 vert cache and it runs on a machine with 16 vert cache it will actually hurt performance since you will be thrashing the vertex cache wildly.
There are a few common ways to optimize the mesh. Hugues Hoppe over at Microsoft has a good paper (http://research.microsoft.com/~hoppe/)about it. Tom's DirectX FAQ (http://tomsdxfaq.blogspot.com/) also talks about this in a bit more detail and covers some ways to do it.
If you're making an export pipeline for a large group of artists and/or you KNOW the art will run on a specific piece of hardware (ie. Xbox 360/PS3/Wii) then this is a fruitful endeavor. Otherwise I personally wouldn't worry about it. There are plenty of other areas where your rendering can be optimized.
Also, not all cards have the same size of vertex cache. A few years ago it was typical to be able to hold 24 verts. I'm not sure what they size is today, but I can't imagine it being much different. It's one of those areas like bandwidth that hasn't improved much over the years. But what this means is that if you optimize a mesh for a 24 vert cache and it runs on a machine with 16 vert cache it will actually hurt performance since you will be thrashing the vertex cache wildly.
There are a few common ways to optimize the mesh. Hugues Hoppe over at Microsoft has a good paper (http://research.microsoft.com/~hoppe/)about it. Tom's DirectX FAQ (http://tomsdxfaq.blogspot.com/) also talks about this in a bit more detail and covers some ways to do it.
If you're making an export pipeline for a large group of artists and/or you KNOW the art will run on a specific piece of hardware (ie. Xbox 360/PS3/Wii) then this is a fruitful endeavor. Otherwise I personally wouldn't worry about it. There are plenty of other areas where your rendering can be optimized.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement