Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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. alt text

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

Product Version: UE 4.9
clotherror.png (28.5 kB)
cloth.zip (197.2 kB)
more ▼

asked Dec 22 '15 at 06:36 PM in Bug Reports

avatar image

143 9 14 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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.

check .apxfile/graphicalLods/submeshes/vertexBuffer

more ▼

answered Apr 21 '16 at 07:55 PM

avatar image

63 2 5 8

avatar image cyaoeu Apr 21 '16 at 09:49 PM

Nice catch! Sure enough it seems to work with 4 bones. Now I feel sad that I didn't test with 4 bones but just with 1, 2 and 3. :P

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi cyaoeu,

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!


more ▼

answered Jan 06 '16 at 03:26 PM

avatar image

Tim Hobson ♦♦ STAFF
48.9k 887 101 877

avatar image azertykeyboard Mar 23 '16 at 12:33 AM

Is there any news on that problem? I've exactly the same problem and have been trying everything I could think of to make it work without success. Any answer would be greatly appreciated!

avatar image Tim Hobson ♦♦ STAFF Mar 23 '16 at 12:57 PM

Unfortunately, there is not update at this time regarding UE-24991.

avatar image cyaoeu Apr 22 '16 at 12:29 PM

User 0000 found out that something was going on with float1 vs float4 since Apex seems to work with 1 bone and 4 bones (with at least one vertex actually weighted to all 4 bones). Actually the number of bones doesn't matter at all, what matters is how many bones the vertices are weighted to.

So Apex in UE4 with files made in the stand alone clothing tool seems to work with meshes with vertices weighted to one bone, or more than four bones.

I made some new .fbx and .apx files. New apex tests

5boneapex ver1.fbx (and .apx) has five bones and a mesh weighted to only one bone. Works.

5boneapex ver2.fbx has five bones and a mesh weighted to 2-3 bones. Doesn't work.

5boneapex ver3.apx has five bones and a mesh weighted to 2-3 bones except one vertex weighted to five bones. Works.

When looking through the .apx file numBonesPerVertex is 4 even though the mesh technically has a vertex weighted to 5 bones so it seems 4 is the maximum. A mesh with 6 bones also gave numBonesPerVertex 4.

numBonesPerVertex (or boneweight and float1 vs float4 like 0000 said) seems to be the issue. This should hopefully make solving the issue a bit easier.

newapextests.zip (481.9 kB)
avatar image 0000 Apr 22 '16 at 03:33 PM

I don't think numBonesPerVertex matters. numBonesPerVertex in physicalMeshes, but UE loads submeshes in graphicalLods.

For example, when submesh1(coat) is weighted to 5 bones and submesh2(tie) is weighted to 2 bones , numBonesPerVertex is 4. But the coat works,the tie doesn't.

The array buffers in submeshes is the actual data used by UE. And the type of boneweight in the buffer matters.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Jan 04 '17 at 07:16 PM

avatar image

143 9 14 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question