Closed powof2 closed 1 year ago
From the docs: "The maximum amount of vertices or indices a mesh may contain". IIRC I used this approach because this value is only used to decide whether meshes can be merged and it's not known which vertices can be merged up front, It wont split meshes bigger than the specified value. See also: https://github.com/libgdx/libgdx/wiki/Importing-Blender-models-in-LibGDX#maximum-vertices
If you send a PR to fix this and/or a better implementation to remove duplicates (along with some measurements to justify the change), then I can have a look at it. See also: https://github.com/libgdx/libgdx/blob/master/.github/CONTRIBUTING.md#pull-requests
in FbxConvCommand.h, this line (line 71) is problematic:
settings->maxVertexCount = settings->maxIndexCount = atoi(argv[++i]);
maxVertexCount should not be equal to maxIndexCount, for example, default index type is short, maximum value for short is 32767, that means any index count is totally legal as long as vertex count is less than 32767, simply put : maxIndexCount != maximum value of short
BTW, current hash method to remove duplicated vertices is way slow (especially in debug mode), my idea is to simply add all vertices, then do a post pass, using std::map or std::unordered_map to remove all duplicated vertices and remap indices, that will be way faster.
thank you for the great tool.