3
$\begingroup$

I have a very tricky-to-solve issue. I have two meshes, both with the same topology, but one is male and one is female. I have rigged one, done the poses and the pose groups, done sliders, and all. Now I want to apply the same weight to the vertices of the other mesh. How can I do that?

I see that Blender, unlike Maya, has no tools to save weights to a file and then load them to the selected mesh used for the binding on the same bones.

1) - I have been trying the weight transfer weight tool from the tool shelf with different options, but the result has not been what I want. The second mesh has ended up with ugly distortions here and there. That transfer weight in Blender somehow tries to emulate what V.A.M.P does in C4D even if V.A.M.P does better jobs.

When the two shapes are equivalent, transfer weight does a fine job, but, when they have the same topology but a different shape like in this case (male and female with same topology), then the result is not as nice as you'd expect.

2) - Another method that I used is to bring in my scene just the male mesh as a non-rigged object, then duplicate the rigged female mesh (the one with poses and sliders), then to the copy of the female rigged mesh I apply the shrink-wrap modifier using as target the male non-rigged mesh.

The result is quite acceptable, but doing it this way, it transforms my rigged female copy of the mesh into the male shape, and the weights of course aren't the best either, and I'd need to remake them on that copy. In this case, though, if I compare the position of vertices in edit mode I can see that the male non-rigged mesh and the female turned into male by shrink wrap have the vertices positioned differently, so maybe this is what is affecting the rig behaviour. So maybe this method is worse than the previous one.

Any other way to do this?

Would it be an easier solution to just roughly apply those weights the way transfer weight does and then adjust the weight on the male mesh so that I can keep the same sliders to deform both shapes (on different layers of course)?

I know you might say "Why not just rig from zero the whole male mesh?". I want them both to have weights similar enough that the sliders can control both the male and female for the various poses that I made with deform bones.

$\endgroup$
0

2 Answers 2

2
$\begingroup$

Try this script if the vertex order is the same:

import bpy

# rename this to your Female & Male names
target = bpy.data.objects["Male"]
pattern = bpy.data.objects["Female"]

# transfer vertex groups
for v_group in pattern.vertex_groups:
    target.vertex_groups.new(name=v_group.name)

# transfer vertex weights
for id, vert in enumerate(pattern.data.vertices):
    for v_group in vert.groups:
        target.vertex_groups[v_group.group].add([id], v_group.weight, 'REPLACE')
$\endgroup$
1
  • $\begingroup$ Neat scriipt it did a sweet job, thanks Jerryno.I had to edit a few vertices weight but the result is very good. Blender really needs to get an export weights on a file like maya and c4d it comes so handy in these kind of tasks. Wish you an happy new year.Sorry for the delay answering but you know this time is run run run $\endgroup$
    – anonb
    Dec 30, 2014 at 14:00
0
$\begingroup$

You can copy the weighs via the Vertex Group list found under the Object Data Properties tab.

(1) Select the mesh you want to copy to, (2) select the mesh to copy from and then use the Copy Vertex Group to Selected.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .