ultimate-research / ssbh_lib

Reading and writing SSBH file formats in Rust
MIT License
8 stars 3 forks source link

Vertex indices for faces and weights can have different sizes #136

Closed ScanMountGoat closed 2 years ago

ScanMountGoat commented 2 years ago

Mesh version 1.10 uses u16 for vertex indices for skin weights. The mesh geometry itself can use u16 or u32. The current API for ssbh_data silently truncates vertex indices to u16 for skin weights, which leads to confusing errors on meshes with a large number of vertices. It may be possible to use version 1.9 in those cases. This should be better documented in the Mesh enum for ssbh_lib. This should probably be a runtime error with supporting tests for ssbh_data since it depends on the selected version when saving.