VRM4U icon indicating copy to clipboard operation
VRM4U copied to clipboard

[UE5] Crash on import when selecting "Generate renamed humanoid mesh"

Open TauFrost opened this issue 1 year ago • 3 comments

When i try to import a vrm into UE 5.1 and 5.2, and select the option "Generate renamed humanoid mesh", Unreal crashes. The crash appears to happen in static void renameToHumanoidBone(USkeletalMesh *targetSK, const UVrmMetaObject *meta, const USkeletalMesh *srcSK)

on

UNodeMappingContainer *src_rig = VRMGetNodeMappingData(srcSK)[0];

as srcSK->NodeMappingData is empty.

I'm also using VRM4U on UE 4.26 and 4.27 and in these versions the crash does not happen.

I just started a new project with UE5, VRM4U is the first plugin i tried to install.

TauFrost avatar Jul 17 '23 18:07 TauFrost

From what I've seen my guess is that the problem is in bool VRMConverter::ConvertRig(UVrmAssetListObject *vrmAssetList)

#if UE_VERSION_OLDER_THAN(5,0,0) ... mc->AddDefaultMapping();

If i understand it correctly mc->AddDefaultMapping(); is what creates the mapping, but the again, i don't understand Unreal so well yet and looking further into that function i'm not sure how to fix it, so these are just my observations.

TauFrost avatar Jul 17 '23 19:07 TauFrost

Today i had the time to test it. Commenting out the #if UE_VERSION_OLDER_THAN(5,0,0) seem to have fixed the problem for now.

TauFrost avatar Jul 18 '23 16:07 TauFrost

Thanks for the report. It will be fixed in the next release. It was caused by UE4 retargeting information.

ruyo avatar Jul 21 '23 13:07 ruyo