Apex cloth corrupted mesh

My player character is a skeletal mesh made of several submeshes (one for the head, one for the shirt, one for the pant, etc).

I am using Apex cloth on the shirt and everything has been working fine until now.

Now I have added another submesh to the character: a bagpack.

I have succesfully reimported the modified skeletal mesh. But when I try to reapply the apx file to the shirt, the mesh of the shirt is badly corrupted: the position of each the vertex of the shirt with a “max distance” set to zero in the apex cloth file is reset to 0,0,0.

I have tried recreating and reexporting the apx file. I have tested various export options for the FBX file.

Nothing seems to fix the problem.

Hi Deckars,

Would you be willing to share the asset so I could test or a similar asset that recreates the problem along with any photo references to clearly indicate the issue?

If you’re willing to share the asset you can post a link here or send privately to me via a PM on the forums.

Hi Tim,

Thanks a lot for coming back to me on this matter. Actually I eventually found the cause of the problem: when I was trying to apply the apex file, the shirt had no UE4 material applied.

Although it is not explicit in the documentation, one of the requirements for the apex cloth physics to work seems to be for the mesh to have a UE4 material applied (and of course the “use with closing” checkbox of the said material must be checked).

I have another question though: I have been using the 3DSMax Apex Clothing plug in from Nvidia to setup the shirt but the vertex painting tool in Max in not very user friendly. So I have tried the standalone Apex Clothing tool from Nvidia and it’s way easier to set up the clothing using that tool.

But when I import an apex file created in the standalone tool, the tangents are corrupted (the mesh is wrongly lit as if the normals were inverted). I have tried using the “generate tangent space” button in the Nvidia Tool but this did not fix the problem.

It would be great if you knew how to solve this because I’d love to use the Nvidia standalone tool from now on.

Thanks again.
Deckard

I understand the frustration with the material not being there. When I first started using cloth I went through the same thing and none of the videos or information I saw mentioned anything specific about applying a default or any material before exporting! That drove me crazy for a couple of hours until I just stumbled across the solution.

I actually posted a simple tutorial on the forums and step 2 is this exact step!

Honestly, I’ve not used the standalone tool, although I do have it. I just use Max when I need a simple cloth asset.

I will take a look though and see if I can see the same. I know I just upgraded to the PhysX DCC 3.3.2 version of the plugin. I’m not sure what version the standalone tool I have it, but I’ll figure it out and let you know my results.

Hi Deckard,

I was able to create a cloth test for comparison with Max and with the Clothing Tool and I’ve gotten an error using the .apx file format that is default when exporting from the clothing tool. If I use the option to “Update Tangent Space” in the clothing tool I didn’t see the error.

This is the error I get before I update the tangent space:

29916-clothtangenterror.png

This is the result on the cloth asset:

29917-clotherror.png

Using the apb option when I export from the clothing tool and using the Update Tangent Space option worked on my end.

Is this the same thing you were seeing on your end?

Hi Tim,

I had the exact same error and visual result when exporting directly from the tool.

Then I used “update tangent space” and reexported. This time I did not get the error but the visual result was identical.

What is the apb option?

Thanks a lot.
Deckard

Okay, cool. Glad I got it to do the same thing, bc that’s always a plus! :slight_smile:

The apb is what I’ve always used when exporting for cloth assets. I’m not sure the exact difference between APB and APX since I’ve never found any clear documentation on Nvidia’s site or documented anywhere else. As far as I know it’s just a later file format than what .apx is.

You can select this file type when you save the asset in the clothing tool and in the file type drop down just choose that over .apx.

Let me know if that works.

Hi Tim,

I have a new problem with Apex Cloth: I have created a new character, wearing a loincloth. I have set the cloth parameters in 3DS Max. It’s a preliminary setup but it’s kind of working in the simulation. I have succesfully imported the model in the UE4. I also imported the APX file and applied it to the character.

If I put the skeletal mesh in tpose in the levels and apply some wind, the loincloth is animated normally.

I am now trying to retarget animations to this character and I get this error:

“Mapping vertices for Cloth Morph Target too many failed! It could introduce a bad morphing result”

Once I hit OK, the UE4 editor crashes.

Do you happen to know what could cause this?

Thanks a lot
Deckard

Hey Deckard,

Apologies for the delay.

Are you still getting this crash with the loin cloth and clicking OK?

If so, would you be willing to share the asset privately or here? We have recently integrated PhysX 3.3.3 and APEX 1.3.3. I can see if I can reproduce the crash on our latest release with 4.7.2 and then try with our internal build of 4.8 with the latest PhysX and APEX updates to see if the issue is still present.

Let me know.

Hi Guys,

I am having the exact same problem as this- did this resolve the problem for you? I tried this and it didn’t seem to make any difference, no matter the settings or if I press update tangents or as soon as I pick the apex cloth file in persona the cloth shader appears inverted.