[Maya] Extract corrective shapes manually?


Is there a way to extract corrective shapes manually?

Here is my current process so far

  1. Go the pose
  2. Duplicate the mesh twice
    a) For the referenced pose
    b) For corrective pose
  3. Extract corrective shape by deducting a) from b)

It does “extract” a corrective shape but it does not match perfectly.

You can see the problem here:

You can check an illustration file here:

P.S. I understand that there are scripts that perform what I exactly intended such as
BSpiritCorrectiveShape.mel but it uses some Matrix mat that I couldn’t quite understand.
So I was wondering if there was a way to do this manually.


By the looks of it the mesh is skinned - I’m guessing you want a pose to be ‘corrected’ by the blendshape? If so you’ll need to generate pose in pose-space, i.e. inverse to bind. Which version of maya are you using? There’s an invertShape command starting in 2017. If not you’d need to compute shape change inverse to bind. Last time i did this was in Max, so I’d need to dig up my code and convert over to Maya.


1 Like


Thanks for the response.
The invertShape command starting in 2017. was new to me.
It works as expected.

Forgive me for asking, but is there another way of doing it using the method (blendshape trickery) I specified above? (i.e. such as deducting a) reference pose from b) corrective pose?

The reason is I’m also trying to use the technique on other software such as C4D and Blender.
So a general description of
If so you’ll need to generate pose in pose-space, i.e. inverse to bind
will be really helpful.

Thank you

Basically, not that i know of :slightly_smiling_face:. If we break down the problem, we have a skinned mesh that has been posed.

So regardless of how we achieve it we need something that happens to the mesh ‘before’ the mesh was posed but that achieves a result after its been posed.

So we need to get two things: The mesh posed with no shape change and posed with shape change.

Now, prior to posing the model was skinned and has a bind pose and weights. So each vertex has a local transform to every joint (bind pose) and a set of indices and weights defining which of those transforms get multiplied together (via the weights) to produce its final position.

So, we basically have to get the changed vertex position world matrix multiplied by the inverse of the sum of its skinned transforms by their weights to push the change back into bind pose. It’s been a while since I did it last, but this is the rough process.

1 Like

Blender has some tools for this
and c4d as well https://vimeo.com/71401854

Not sure if you can extract the shape the same way but it is what I could find.

Not entirely sure I’ve followed the whole convo - I take it you have a bunch of posed and corrected meshes, and want to apply that as corrective blendshapes on a new mesh?

Been a while since I worked with this - I think my method has been to simply transform the base mesh to match the pose of the corrective, then create an active blendshape on the basemesh, and then transfer all vertex positions. I don’t remember if Maya’s built-in attribute transfer works, I’ve used a script for that bit. If there’s many vertices, you’ll want some api to speed it up.

If the vertex order/topology doesn’t match, I would do something like this: for each corrective-pose object, maintain a non-corrected but posed version of the same topology, which can take the corrected pose as a blendshape. Then pose the new base mesh to match that uncorrected pose, wrap the base mesh to it, and activate the blend shape.