Importer multiplying vertex?

Hi,

Im importing a model 3ds from a file that 3d MAX tells me that has about 10,000 vertexes.

But when i import and call getVertexCount() it tells me that has about 40,000 verts.



Is there an explanation for that behavior?

One explanation is that there is more texture coordinate data than vertex data. Ie one vertex has two texture coordinates associated with it. In those cases, the vertex gets duplicated in order to ensure a 1:1 relation for the renderer.

But do you know if this method is bringing this information? Or are you suposing?

Well, I am supposing since I haven't really explored the 3ds importer all that much, but from the research I did when I built the Dxs importer, this is something that's usually done (and its what I used). I've also observed this behavior in the other importers, and in a way it makes sense since a TriMesh is built with a vert,normal,texture array where each place in each array correspond to each other, and the index array to put together the triangles. So if a vertex has a few texture coordinates, you wind up running out of vertex information and your texture mapping will become distorted.*



Also make sure all your vertices are welded and you don't have a lot of "loose" vertices.



Tho, I'm sure there are more sophisticated methods…



*And im not talking about different texture channels for multi-texturing here either. That's a whole other subject altogether.