Closed io7m closed 7 years ago
This raises the question of what constitutes structural compatibility. For example, if a bone in a skeleton is renamed, then the skeleton would still be "compatible" in the sense that the positions and numbers of bones have not changed.
A skeleton is compatible if meshes bound to that skeleton will still continue to work after a change is made to the skeleton.
This means that:
This pretty much rules out all structural changes.
What happens if existing joints are moved/rotated/scaled? Does a mesh remain "compatible" with a skeleton when this happens?
What happens if existing joints are moved/rotated/scaled? Does a mesh remain "compatible" with a skeleton when this happens?
No, it doesn't.
If, in effect, absolutely everything is relevant to whether or not a skeleton remains compatible, then everything in the skeleton has to be included in the hash.
The question remains about the specifics of hashing. Inevitably, it's going to be a SHA256 sum of the skeleton data. Need to come up with a well-specified, portable, and deterministic way to turn a skeleton into a string and then hash that string.
Calculate a deterministic hash value from a compiled skeleton.
The hash value can then be recorded for both skeletons and their associated meshes (stamped into the meshes as SMF metadata). This allows for checking that a skeleton has not been modified without the associated meshes also having been re-exported.