ozRocker Posted April 16, 2017 Share Posted April 16, 2017 In Blender I have 2 copies of a mesh. One of them has been warped but the vertex count is the same. They both say 7,405 vertices in Blender. When I export to .babylon file one mesh has 9,350 vertices and the other has 9,352 vertices. I'm trying out the new morph manager and the meshes need the exact same number of vertices. How can I make the Blender exporter consistent? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 17, 2017 Share Posted April 17, 2017 You might edit line 297 of mesh.py, once it is unzipped. Add an addition test which will never be true. This will turn off vertex optimization, so count will not change, but it will get very large, basically # of triangles * 3. This assumes only 1 material. There will be border triangles if multi-materials. eg. alreadySaved = alreadySavedVertices[vertex_index] and not useFlatShading and 3 == 4 Quote Link to comment Share on other sites More sharing options...
ozRocker Posted April 17, 2017 Author Share Posted April 17, 2017 28 minutes ago, JCPalmer said: You might edit line 297 of mesh.py, once it is unzipped. Add an addition test which will never be true. This will turn off vertex optimization, so count will not change, but it will get very large, basically # of triangles * 3. This assumes only 1 material. There will be border triangles if multi-materials. eg. alreadySaved = alreadySavedVertices[vertex_index] and not useFlatShading and 3 == 4 ok cool. Well I solved it for now by exporting as an OBJ and using the OBJ loader. Do you think there'd be a way to apply the same optimisation to multiple meshes? It would be neat if you could group a bunch of meshes together so the same optimisation is applied to all. I don't have a great understanding of this though so maybe its not possible. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted April 17, 2017 Share Posted April 17, 2017 The direct answer to your question is no. If you have any change such that a vertex somehow no longer matches across triangle with respect to normal /UV/vertex colors/matrix weight or matrix indices, then in one export you will get a mis-match in vertex count. In about a month, I will ported some of the stuff I will be doing for shapekeys. There the vertices are set as normal. The shapekeys are mapped into the same order. This issue exists, because you are jumping the gun and bleeding accordingly. ozRocker 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.