I'm working with procedurally generated shapes that have UV mapping, normals, and vertices/indices. I've found a couple algorithms for optimizing and lowering the poly count of indexed meshes but none of them seem to take normals and UV maps into account, so to my understanding, they would be totally unusable. Any help very much appreciated.
Asked
Active
Viewed 269 times
1
-
What have you found for optimization? (Any links?) – User Mar 27 '17 at 01:52
-
@Manius Such as http://gfx.cs.princeton.edu/pubs/Sander_2007_%3ETR/tipsy.pdf and also different kinds of optimzations such as Tom Forsyth's linear-speed vertex cache optimisation – user3441843 Mar 27 '17 at 21:04
-
I'm working on a similar problem so I probably can't help much at the moment. I would think you could calculate new normals (maybe speed would be an issue), but UV I'm not as sure about. That algorithm posted might be trickier because it doesn't seem focused on vertex elimination, but if you have one which simply reduces the number of vertices I would think you could just drop corresponding UV coords. – User Mar 28 '17 at 01:01
-
@Manius I also forgot to post this that I found about reducing actual poly count http://paulbourke.net/geometry/polygonmesh/ – user3441843 Mar 28 '17 at 04:24
-
I've tried a test here based on my understanding. Created Vertex objects with id and position data, but also a texCoord field (2 floats since they're 2d coordinates). I used a totally different algorithm which can collapse a vertex into another one to reduce poly count. The "collapsed" Vertex was just discarded (along with it's originally calculated texCoord), and everything seems to look fine still. If you can't calculate your texCoords on the fly, maybe you could do the same. I was able to calculate texCoords after removing vertices in my case (no need to calc coords that get dropped). – User Apr 04 '17 at 19:32
-
Off topic kinda, but if you're wondering about the algorithm I tested with here it is. https://www.scribd.com/document/3124116/A-Simple-Fast-Effective-Polygon-Reduction-Algorithm Also I suggest posting this on the gamedev stack exchange site, that field is kinda the master of real time rendering optimizations. – User Apr 04 '17 at 19:35