h4lfheart / FortnitePorting

Automation of the Fortnite Porting Process
GNU General Public License v3.0
250 stars 45 forks source link

Add support for `CurveData` import & fixed some bugs with standalone `PoseAsset` imports #80

Closed RedHaze closed 1 day ago

RedHaze commented 1 week ago

Summary

This PR adds support for shape key generation based on CurveData for pose entries in Poses using CurveNames from Curves as the driver for CurveData values. The assumption is that each CurveName is an existing imported shape key. Therefore, generation of CurveData based shape keys occurs after a full import of bone influenced poses. This likely won't map 1:1 in all cases, but the general result for at least cases I care about, like the import of ARKit blendshapes via FortniteGame/Content/ArtTools/Pose_Asset_Remaps/ARKit_Remap_PoseAsset.uasset, seems to produce correct results.

Do note that curve-based shape keys imported as part of character import will be prepended with curves_ as they may be shared with bone-based poses which may be preferred.

When importing via standalone Pose Asset, curves_ is only prepended if a shape key with the same name already exists on the object. Otherwise, it imports as the name provided in the pose. This makes importing ARKit shapes fairly straight forward.

Special note about ARKit Blendshapes

Other changes include:

Testing I did some manual testing primarily with Fish Thicc since his pose asset has Curve Data included, however, I'm not entirely sure what its purpose is.

Tested with Tasty Rig on/off, reorient bones on/off, and merge armatures one/off. Tested normal import, import of ARKit blendshapes, and a wipe & reimport of Fish Thicc pose asset.

Additional testing is appreciated.