PVRGeoPOD Vertex Count

hi, recently, I’ve been toying around PVRGeoPOD for exporting my models and surprised to find out final POD file contains about x4 times of vertices. So, I’m here to report in, and get some help.





Most of my work is done in Blender, and exported to 3DS for just animation and exporting. All of my models are extremely simple containing about 20~40 vertices, ( recently there are ones w/ 80~200 vertices but anyway…) no skinning, and just simple robot-arm like animations. Plus every face is triangle. (no quad) So I don’t believe PVRGeoPOD plugin for 3DS would have some issues with my models.





Between Blender and 3DS, things looking fine. Same # of vertices, faces, and well preserved UV. For exporting option, I choose to go with followings:





+export geometry


+export materials


+export controller


+Coordinate system : OpenGL


+Normals


+Mapping Channels (there is only one UV channel)


+Primitive type : Triangle List (indexed)


+Triangle sorting method : PVRTGeometrySort





With those options, an example model of 80 vertices is converted to have 361. I switched to Triangle list, but I see no difference. Printout shows POD file containing same vertices repeated 3~4 times.





What am I doing horribly wrong?

So you’re:





1) Modelling in Blender


2) Saving as 3DS


3) Loading into 3DS Max, to export to POD





Is that correct?





Well firstly you can never have more than 3 vertices per triangle, so please send us the 3DS file for investigation.





Secondly, 3 vertices per triangle is horribly inefficient. A tessellated grid tends towards 0.5 vertices per triangle. Typical geometry has around 0.5 to 1 vertices per triangle, since triangles share vertices. I don’t know whether or not blender shares vertices between triangles internally, but I do know that partly this ‘vertex splitting’ will be due to the 3DS file format - I have in the past experienced this myself, and never recommend that file format. You can try to fix it by welding the vertices in 3DS Max before export (use a small weld distance so that the geometry does not move - you only want vertices that are actually meant to be the same point to be merged into one).





Regards,


Aaron.


Aaron wrote:
So you're:



1) Modelling in Blender

2) Saving as 3DS

3) Loading into 3DS Max, to export to POD



Is that correct?



Well firstly you can never have more than 3 vertices per triangle, so please send us the 3DS file for investigation.




Yup. That's what I'm doing. Plus, I've tested with Collada2POD, and that yields same result. Let me have contact point so i can send 3ds, blend and pod file for you to examine.





Aaron wrote:
Secondly, 3 vertices per triangle is horribly inefficient. A tessellated grid tends towards 0.5 vertices per triangle. Typical geometry has around 0.5 to 1 vertices per triangle, since triangles share vertices. I don't know whether or not blender shares vertices between triangles internally, but I do know that partly this 'vertex splitting' will be due to the 3DS file format - I have in the past experienced this myself, and never recommend that file format. You can try to fix it by welding the vertices in 3DS Max before export (use a small weld distance so that the geometry does not move - you only want vertices that are actually meant to be the same point to be merged into one).



Regards,

Aaron.




I'll definitely give it a shot. Thank you so much for reply.
xylopia wrote:
Let me have contact point so i can send 3ds, blend and pod file for you to examine.



devtech@imgtec.com



Thanks,

Aaron.

I’ve sent blend, 3ds max, and POD file. When you can spare some time to look into my case, please let me know how I can properly export my models.





I can go w/ Collada export but that path yields exactly same result; increased number of vertices.

We can’t reproduce your bug with the files you sent.





The files you have sent us always have less than 3 vertices per triangle (it contains 136 faces and less than 408 vertices in all the exports we tried).





We tried four exports with different options:





Position + Normal + UVs: 361 vertices 136 faces


Position + UVs: 175 vertices 136 faces


Position + Normals: 361 vertices 136 faces


Position: 80 vertices





Adding normals or UVs increases the number of vertices, as vertices must be split/duplicated when the triangles that use it have differing normals (different “smooth group” in 3ds max) or non-continuous UV coordinates.





We used the upcoming 2.6 release for those numbers. Checking with the 2.5 release, we still get below 408 vertices.





What version of the exporter are you using?


Aaron2010-03-03 14:06:59

Aaron wrote:
Adding normals or UVs increases the number of vertices, as vertices must be split/duplicated when the triangles that use it have differing normals (different "smooth group" in 3ds max) or non-continuous UV coordinates.



That explains. I've thought PVRGeoPOD would simply export normals and UV and splitting vertices according to different smooth group never came to my mind. Thank you for taking time to look into.