Apex cloth, 1 bone works but 2+ doesn't
I'm using 4.9.2 and Blender version 2.76b. I'm exporting an .fbx file and opening it in the standalone ClothingToolCHECKED.exe (physx ver. 3.3), and from there compute the tangents and save as an .apx file.
Using one bone it works fine, but as soon as you use two or more bones you get the following error when importing the .apx file in UE4.
This error is a bit strange since according to the code the bone that failed will be printed as a string, but nothing is getting printed which makes it unclear if there was a bone that failed or not.
The interesting apex code starts from line 753 in ApexClothingUtils.cpp (https://github.com/EpicGames/UnrealEngine/blob/a27ad66f0a075f3b74ef8f68a4b2b0da4882425e/Engine/Source/Editor/UnrealEd/Private/ApexClothingUtils.cpp#L753), the bone mapping code starts at line 804. I don't see why two bones can't work if one bone works.
I've got some theories as to why this happens. The first is that Blender outputs an armature object as the "empty" object for the rig which in both UE4 and the Apex standalone tool turns into a separate bone (which I'm not sure if it should or not). This means that my 1 bone fbx actually is 2 bones, the 2 bone fbx is 3 and so on. Maybe this causes some issues. I know for example that you have to animate the armature object in Blender in order to use root motion in UE4.
Next, opening the .apx you can see that the boneCount variable says "1" in the 1 bone .fbx but "3" in the 2 bone .fbx, which to me seems really strange. I tried manually setting it to "2" but it didn't help.
It would be nice to be able to use a combination of blender, the apex cloth standalone tool and UE4 so I hope this can be resolved (if it is in fact a UE4 bug). I'm attaching the .fbx files and .apx files. Zip file here
asked Dec 22 '15 at 06:36 PM in Bug Reports
I was suffering from the same message. but I resolved it.
The cause of this error is Boneweight datatype.
UE importer accepts .apxfile that has float1 or float4 boneweight. float2 or float3 boneweight causes this error.
This datatype depends on the vertex affected by a largest number of bones . When a cloth mesh has at least one vertex affected by 4 or more bones ,datatype will be float4,work fine. only 2 bone-affected vertex ,float2.
I was able to confirm what you're seeing and have reported this with UE-24991. I'm not sure if this is a bug with UE4 or if this is something on Blenders end. Once a developer has investigated this and I can update with any relevant information here.
Thank you for reporting and including very detailed information!
answered Jan 06 '16 at 03:26 PM
Tim Hobson ♦♦ STAFF
A small update: Editing the FBX exporter in Blender to not add an additional bone for the armature modifier (https://krisredbeard.wordpress.com/tutorials/tutorial-prevent-blender-fbx-exporter-adding-extra-root-bone/) seems to fix this issue. I was able to add a mesh with several bones and still have APEX work.
answered Jan 04 '17 at 07:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here