trouble retargeting clothes to metahuman (also to do with weight painting)

So I’ve built some custom clothes for metahumans, but the weight painting is driving me crazy.

Most people transfer weights from the metahuman to their clothes in blender, but I took one look at how horrific of a job it did on my particular outfit and ran. :joy: With how bad it was, I’d guess it would be easier to just do it from scratch, but that also freaked me out, partly because I’d never done it before and partly because I knew it would take a long time finessing and would wear me out.

Long story short, I was able to get a mostly fantastic automatic weight paint in another software that only needs a little bit of clean up, but the drawback was it gave the clothes a different rig than metahumans have.

So I’ve been trying to retarget the clothes to the metahuman rig today.

My process was to copy the ik rig and ue5 to ue4 retargeter from characters> mannequins_ue4 > rigs folder.

In the copies I’d made, I opened the ik rig and switched the preview mesh to a pair of pants I had for my character. I hit refresh and save.

In the retargeter, I switched the source Ik rig and preview mesh from the mannequin versions to the metahuman versions and the target ik rig and preview mesh to those I had for the pants.

I then created an animation blueprint using the retarget pose from mesh node and selecting the the retargeter I had just set up for the ikretargeter asset. Compiled and saved.

Inside my metahuman blueprint, I changed to body skeletal mesh to the preview mesh and the leg mesh to the pants. For the pants, I selected animation mode > animation blueprint and for animation class I selected the animation blueprint I had just created.

The garment itself looks nice, but its animation does not match up with the metahuman’s, so the legs poke through.

Screenshot 2023-07-01 111322

Why is this? Did retargeting mess up the weight painting I had done? Is there any way to fix this or do I have to manually weight paint in blender?

(note, hiding the leg meshes mostly hides the problem, but not around the ankles, plus I’m a perfectionist and I eventually want to create shorts, so that is not an option!)