Data transfer modifier giving strange result

http://www.pasteall.org/blend/40435

This file. What I do is select the shirt object and add a data transfer modifier. I choose vertex groups and select generate data layers. Then I select the shirt object and shift select the bones and ctrl p to parent it.

When I go into pose mode and move the bones, I get a strange result. I want the shirt object to follow the model. I want to transfer weights and I saw that this is how to do it but like I said, it’s giving me a strange and unusable result.

You have a few things going on, the shirt has the mirror modifier on it and where it joins at the front you have faces so you have created internal geometry and it doesn’t join, remove the faces from the end and merge it properly and apply the modifier.
CTL p and just parenting it to the bones will give unexpected results :slight_smile: you need to have an armature on the shirt as well, just do ctp p and select armature deform just to parent it with an armature.
then highlight your base mesh, shift right click and highlight your shirt
go into weight paint mode
hit t to get the tool bar up in the left
click on the tools tab
click on transfer weights
in the context menu under the tool tap change source layer to name
make sure destination says all layers

That will transfer the weights, you’ll probably have to do some clean up in weight paint mode like for the long bit of mesh at the top of the shirt.

There are other issues that will cause you problems, the rig is not great the bones are joined a bit weird, the bone rolls are all over the place and it’s going to be hard to pose it with just IK controls on the arms and legs, the weigh allocation on the base mesh is not great so you are just copying that over to the shirt. It’s great to learn how it all works, but I’d have a look at some of the other humanoid rigs around like rigify, pitchpoy, blenrig etc. as well so see how they do it as well.

Saying that, it should start moving together at least if you do what I have in the start of the message (hopefully!)

Hey I had the same issue in blender 4.0.2 also. If before applied it is visually correct, but applying causes uv stretching or vertex color position offset, even though the data transfer is the top and only modifier

My workaround then don’t apply it in the modifier stack, move mouse to viewport, duplicate a copy shift d, then to alt+c, convert to mesh, this way yielded me a mesh without modifiers and the uv and vertex color is identical to before applying.

I did lost all shapekeys with this workaround But it’s easy enough in my case to transfer it back from the original mesh. If you have a lot of shapekeys to copy, don’t do it by hand, first try this python script from Reddit:

https://www.reddit.com/r/blender/comments/er7sw4/copy_all_shape_keys_from_one_object_to_another/

Blockquote

import bpy

def copy_all_shape_keys():
if len(bpy.context.selected_objects) == 2:
source = bpy.context.selected_objects[1]
dest = bpy.context.active_object
for v in bpy.context.selected_objects:
if v is not dest:
source = v
break

    print("Source: ", source.name)
    print("Destination: ", dest.name)
    
    if source.data.shape_keys is None:
        print("Source object has no shape keys!") 
    else:
        for idx in range(1, len(source.data.shape_keys.key_blocks)):
            source.active_shape_key_index = idx
            print("Copying Shape Key - ", source.active_shape_key.name)
            bpy.ops.object.shape_key_transfer()

print(“Start”)
copy_all_shape_keys()
print(“End”)

Blockquote

This is probably a bug on blender side, https://projects.blender.org/blender/blender/issues/77804
But sadly they closed it without further investigation. Adding this for visibility and hope the devs would look into it again. Or simply add shapekeys to geometry node so I can transfer it myself without the legacy vintage data transfer modifier they reluctant to fix