Closed SheLikesCloth closed 1 year ago
There are two invalid matrices in Edel's skeleton, center_point and L_hand_point (line 4511 and 6155 in metadata.json, respectively). Both are [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,1]], which is mathematically invalid for a rotation matrix. If you correct them to [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], then the model should compile fine. Angelica's skeleton (CHR019) has the same issue.
I will not be "fixing" this as it is not a bug in my script. I have no idea why mathematically-invalid matrices are in the skeleton; I have to assume that someone at Falcom inputted them by hand because no software would have come up with them. I think it's best that errors due to hand-coded errors are fixed by hand, because any attempt I make at detecting these errors and fixing them in a robust manner would have unintended consequences that may be very difficult to track down. (In other words, if they are not fixed by hand, there may be crazy distortions in the model and you would not know why. After all, I cannot guarantee that the only errors will be mistyped identity matrices.)
I posted a workaround, with this commit: https://github.com/eArmada8/ed8pkg2gltf/commit/190045ac91a1e5f182df70da3a4cefe813c358e6
The fix is included in v2.2.2
Tested working with both Edel and Angelica.
Problem
build_collada.py
failed when using Edel’s model from CS4.Reproduce
Edel’s pkg file attached to ease in troubleshooting: C_CHR735.zip
C_CHR735.pkg
fromassets.pka
from Steam CS4C_CHR735.pkg
:C_CHR735.pkg
,ed8pkg2gltf.py
, andlib_fmtibvb.py
into folder without other filesed8pkg2gltf.py
C_CHR735
build_collada.py
CSIVAssetImportTool.exe
lib_fmtibvb.py
PhyreAssetDatabase.dll
PhyreAssetDatabaseD3D11.db
PhyreAssetDatabaseUnmanaged.dll
PhyreAssetProcessorDO.dll
PhyreAssetScript.lua
PhyreAssetServices.dll
PhyreAssetSpec.xml
PhyreDummyShaderCreator.exe
replace_shader_references.py
SQLite.Interop.dll
System.Data.SQLite.dll
write_pkg.py
build_collada.py
Result
This is the information I got from running
python build_collada.py
from the terminal:File version:
2.2.0 (2023-05-01)