Indexed arrays.. pointless?

Started by
12 comments, last by Alex Baker 18 years ago
well if the you have 14k different vertex, normal, uvs combinations your stuck. Indexed arrays wont help with that and they will add aproximately 14k indexes to the data you have to pass to the gpu. What kind of model are you trying to draw, that has 14k different vertexes, normals, uvs combinations?
Advertisement
OK, just a final update for those of you interested in this, or having similar issues.

The tips you guys provided did help, when i went and made that one function to check all together and get one index, where it only found 8 dupes, that was the way to go.

Apparently, just about every single vertex has it's own tangent. So trying to remove dupe tangents didnt work when there were only 8 ;)

I dropped down from 14k verts/normals/uvs to 3.2k. Im happy with this and will allow me to use the old method of passing in tangents to opengl. All i really wanted was less iterations for the animation system.

Thanks for the help all, and if anyone else runs into this problem, don't remove tangents.
Quote:Original post by nefthy
well if the you have 14k different vertex, normal, uvs combinations your stuck. Indexed arrays wont help with that and they will add aproximately 14k indexes to the data you have to pass to the gpu. What kind of model are you trying to draw, that has 14k different vertexes, normals, uvs combinations?


it was the tangents. i had 14k different tangents, which made everything else so massive :p
nef,

regarding your comparison speed when looping through ton's of vertices: implement a hashlist on this, it will cut down the time needed to compare this stuff massivly (i had the same problem with our 3DSMAX exporter - with a hashlist the time cut down was by 70-80%).
Imagine a model with 80-90k vertices - doing this without the hashlist you can go for lunch in the while :-)

regarding the problem with normals: don't bother with computing the normals yourself in your code - just export the normals from your modelling package; this way will save you the headaches with normals smoothing and all this stuff, additionally you can be sure that you will have the normals exactly as the artists wants it.
Alex BakerComputer science is dealing with computers as much as astronomy is dealing with telescopes.

This topic is closed to new replies.

Advertisement