Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slight fix for triangle assignment to bodypart on partition import #497

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

Candoran2
Copy link
Member

@niftools/blender-niftools-addon-reviewer

Overview

  1. Added warning for too many bones per partition (since some games will crash with that, I think?) and pulled up the check for this.
  2. Fix for issue "Some polygons of Parthurnax not assigned to any body part." error on unmodified model #496 , by allowing for multiple triangles to map from the same vertices when doing the map from partition triangles to the main NiTriShape.

Detailed Description

  1. Self-explanatory.
  2. Causing the issue was the fact that there were two triangles using the same vertices for this particular mesh, so on import those vertices only mapped to the first triangle. The code has now been changed such that the vertices map to a list of all triangles (in the overwhelming majority of cases just 1) using those vertices. However, that does mean that all triangles sharing the same vertices will end up in the same partition on import, which is not necessary (though always the case in vanilla meshes, as far as I know). Also, it is possible for a triangle to be defined in the main NiTriShape, but not in any of the partitions (again, this does not seem to happen). A true fix would mean that we import skinned shapes from the triangle data in the NiSkinPartition instead of relying on the triangles in the main NiTriShape, though of course this is a lot of work. It will be necessary for SSE meshes when we support those, because there, triangles are only defined in the NiSkinPartition.

Fixes Known Issues

  1. "Some polygons of Parthurnax not assigned to any body part." error on unmodified model #496

Documentation

[Overview of updates to documentation]

Testing

[Overview of testing required to ensure functionality is correctly implemented]

Manual

[Set of steps to manually verify updates are working correctly]

Automated

[List of tests run, updated or added to avoid future regressions]

Additional Information

[Anything else you deem relevant]

Copy link
Member

@neomonkeus neomonkeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with solution provided here to fix the issue is appropriate for current set of supported feature.
Always good to highlight the limitations and at what point the need becomes a must to rework the solution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants