How do I transfer shape keys?

So let’s say I have a nude character model with bone weights and shape keys (for slim/fat characters). Let’s say it’s for a game.

The weights are mostly trivial to transfer. But how do I transfer the shape keys from the body to any clothes?

Is there any valid reason shape keys are not simply part of the Data Transfer operator? I mean, a shape key is nothing but simple per-vertex vector displacement. If one value (as in vertex weights) can be projected, then so can three to get a displacement vector.

I have just discovered this today, to my horror, because I need this right now and always just assumed it was there. That will teach me… But still, what the actual fuck?! Why is this missing!

Or am I just missing something? (Please tell me I’m missing something…)

Hey, it appears I’m not actually crazy. This is the reason I assumed it was there:

I remember trying out those patches way back in 2013 and clearly they worked.

So again, WTF?

There is a transfer shape key option in the little down arrow menu, but I’m not sure if it does exactly what you’re trying to do or not. I don’t mess with shape keys much.

That operator just straight up copies the shapekey data. It only works on meshes with the same vertex count and order.

Ah bummer. Like I said I don’t mess with that stuff much. Sorry it wasn’t useful.

1 Like

You might be able to use a hack I use once in a while. Don’t know how many shape keys you have or if you have used them for bone corrections etc. But, here is how I have done that with clothing before. I make vertex groups of the mesh that I want to deform for each shape key. (just the shape key part by guess.) Then I apply a shrink wrap modifier on just that group to the base. Apply the modifier as shape key. Adjust as needed. Sometimes this may take as much time as just creating new ones, sometimes it doesn’t. Depends of your mesh.

1 Like

since long ago I’ve been making use of the ‘Lichtwerk Mesh Transfer’ addon by Philipp Oeser, which gives good results and never crashes ;).

I don’t know how effectively it can transfer shapes on clothes (it works by space proximity and you can choose the number of vertices to interpolate from), but overall it works much better than the alike internal functions, so it worths a try anyway.



Hey, you saved my skin here! It works!

Thanks a lot! :smiley:

glad to have been helpful

I’m personally very grateful to Philipp Oeser for his great addon.

I used the search menu and I was able to find this missing transfer shapekey feature:

It is in blender right now. It just seems that no one added it to the data transfer menu. My guess is that this was going to be put somewhere appropriate, but it was lost in the shuffle and no one complained about it. lol, and to think not too long ago, I told someone on this forum that all the tools are currently found on menus.

You should mention this on the devtalk forum. This should be added under Object > Transfer Mesh Data > Vertex Data.

1 Like

This has been mentioned several posts up. Unlike the mesh data transfer tool, this operator works by doing a straight data copy and only works on meshes with the same topology and vertex order. It’s not useful in this case.

Ah I see. My mistake.

Could you share step by step on how you do the transfer from body to clothes using Lichtwerk mesh transfer addon? I try to do the same thing, but nothing happens.

last commit was 2 years ago, if somebody can update this script for 2.8 it would save my life and probably many other’s

Alternate way of transferring shapekeys, without any script, is to use a deformer. Surface deform is easiest: give a surface deform to your destination mesh targeting your source mesh, bind, set shapekey of source mesh, apply surface deform as shapekey. Mesh deform would be a bit more work (probably a 0 offset solidify on source mesh to start out), but might work better. Don’t expect good results from dissimilar starting meshes.

1 Like

That’s not too bad for single shapes, but when your rig has 50 different corrective shapekeys, that’s not viable.

It’s perfectly and easily scriptable. Surface deform, bind. For 1, #shapekeys, duplicate object, increment shapekey index, rename to name of shapekey, set and pin destination shapekey[index], apply modifier. Select all, set original as active, transfer as shapes. Don’t know my Python, but all the functions can be read off the console.

Sure, but then you might as well update Lichtwerk :slight_smile:

The script linked is 1453 lines. The script I was suggesting should be fewer than 10 lines. But if you want to update the Lichtwerk script, I don’t think anyone would complain.

I know you meant to be snarky, but here: (66.2 KB)

Vertex colors don’t work, but shape keys and vertex groups do.
Maybe I’ll get the rest of the kinks out some other day, time for bed :smiley: .