Films Training Blog
Pipeline and Tools Characters
Pipeline and Tools Characters
search Login Join
favorite

Development Fund

Support Blender Core Development with a monthly contribution.

theaters

Blender Studio

The creators who share. Access production content and knowledge from the Open Movies.

code

Blender Developer Blog

Latest news and updates on Blender development.

people

Get Involved

Join the community and help with design, development, docs and more.

bar_chart

Open Data

A platform to collect and display the Blender Benchmark results.

menu_book

Blender Docs

Documentation on Blender's features, tools and API.

Blender Conference

The yearly event that brings together the Blender community in one place.

download

Get Blender

Download the latest Blender version, or try the beta!

Films
Training
Blog
Pipeline and Tools
Characters
Search
Login
Join

9th Feb 2022 | Rigging

Pose Shape Keys Add-on: Rig Like Never Before!

Demeter Dzadik

Author

flag Report Problem

Rigging a character can be done in a million different ways, many of which involve using shape keys. In Blender 3.1, a tiny utility function was added, which I believe can benefit many of these workflows and enable the creation of entirely new ones.

While working on the upcoming Snow character rig, I wrote an add-on around this new functionality, here's a video that contains everything there is to know about it:

Click here for a link to this video only. See the bottom of this page to download the addon.

In this article I go over a bit more of what this is and why you should care if you're a rigger!

Current Corrective Shape Key workflows

Most shape keys are a correction sculpted on top of prior deformation. For example:

  • The character's elbow is bent using an Armature, then a shape key is used for additional tweaking.
  • Two facial shape keys look beautiful on their own, but when both of them are activated, the result is terrible. So, you create a 3rd shape key which only activates when both of the previous ones are activated at the same time.

Both of these cases are Corrective Shape Keys; They are just a Delta added on top of a Deformed Mesh, in order to correct the deformation and create a Beautiful Mesh.

Here are those states of the mesh visualized with a bent cylinder:

pose_shape_key_blogpost_01.png

Now, once you've sculpted your mesh into its Beautiful Mesh state, you probably don't want to lose that exact state. But currently, that state is not stored explicitly anywhere. This means that if you change any of the data used to arrive at that state, you won't arrive at the same state anymore. Here I changed the vertex weights of the cylinder:

pose_shape_key_blogpost_02.png

This means you can only start working on your corrective shape keys once you are 100% sure that you will not touch any vertex weights, bone constraints, etc any more. If you find out something is broken after having made your correctives, you either fix it and re-make all your corrective shape keys, or you simply don't fix it. That's pretty bad!

So why not just store the Beautiful Mesh!?

You could do this already, but remember, at the end of the day you need to calculate a Delta, which, when added on top of an arbitrary Deformed Mesh, should result in your Beautiful Mesh. So, to calculate this Delta, you just need to do some algebra, right?
Delta = Beautiful Mesh - Deformed Mesh!
But many people who tried this before had to realize that it's not so simple. I won't go into why exactly, but as of Blender 3.1, this actually IS possible, thanks to CrazySpace being exposed to the Python API.

So it works! But how can it be used?

Probably in more ways than I can even think of. Below are some workflow examples that the add-on enables.

1. Basic Workflow: Rig first, correct deformations later

  • Save a pose whose deformation you want to correct (eg. Elbow Bend)
  • Create a shape key and sculpt on it
  • Save the resulting Beautiful Mesh
  • Feel free to make modifications to the vertex weights, bone constraints, etc, to achieve better interpolation into the pose
  • Re-apply the saved Beautiful Mesh, so the combination of your new weights and etc. still combine into the same final shape that you had before.

Usage example of the shape key rig workflow using the Snow character.
Usage example of the shape key rig workflow using the Snow character.

2. Reverse Workflow: Sculpt first, rig later

  • A character artist can sculpt facial expressions to great quality and detail. This can be your Beautiful Mesh.
  • You pose the rig to be as close to this sculpted shape as possible, and create a rig control that blends into this pose using Action Constraints.
  • You can now create a shape key that will blend into the exact pose created by the character artist.
  • (Just make sure your shape key activates at the same time as the Action Constraints!)
  • As always, you can change whatever you want in the rig, and you will be able to restore the shape.

3. No bones, just shape keys

  • Create a facial rig based entirely on shape keys and corrective shape keys.
  • Realize that one of the lower level shape keys looks terrible. But there are already 20 other shapes that build on top of this!
  • No worries, just make your fixes where you need to.
  • When you're done, you can fix the other 20 shapes with the click of a button.

A single Pose Key to manage 24 Shape Keys.
A single Pose Key to manage 24 Shape Keys.

4. Author finger correctives 24 at a time

  • Create a pose where all finger bones (not the thumbs in this example) are bent by 90 degrees.
  • Sculpt the desired fist shape on all the fingers.
  • Apply the single sculpted shape to 24 shape keys with a single click.
  • (Although you still have to create the vertex group masks and the drivers manually)
  • You can now tweak and iterate on the sculpted fist shape, since you can still update all 24 shape keys with a single click.

If you've read this far, you should probably check out the video above, where I showcase many of these workflows and features.

Both directions of Neck Tilt Shape Keys are managed by a single Pose Key.
Both directions of Neck Tilt Shape Keys are managed by a single Pose Key.

Maintaining Symmetry

For symmetry, you need two copies of the same Shape Key.

If it affects the center-line (eg., Neck Twist):

  • Enable "Mirror X" option on one of them
  • When you update the Shape Keys, the one with Mirror X enabled will have the corrective deformation mirrored around the X axis.

If it doesn't affect the center-line (eg. Elbow Bend):

  • Create vertex groups to mask left/right sides of the mesh.
  • Mask one Shape Key to each side.
  • Both Shape Keys store the deformation of both sides, each of them masked to only affect one side.

Sky's the limit!

Note though, that this add-on only contains my ideas for how this tech could be used. The core of this whole idea however, is simply the ability to deform already deformed meshes in a predictable/intuitive way. It's the same code that Blender uses to let us sculpt on deformed meshes. So, if you have ideas for what else this could be used for, and you're an add-on developer, you should try to see what you can do with it!

Demeter Dzadik

Author

flag Report Problem

7 Comments

Join to comment publicly.

Tom Vonlanthen

10th February 2022 - 22:17

Wow incredible! :)

Arthur Shapiro

10th February 2022 - 13:13

Congrats Met, you've created the thing that leads the shapy keys oriented rigging to the heights earlier unreachable!

Henk Kok

14th February 2022 - 14:02

Excellent, really glad to see this happen, thank you!

Angel Vazquez

14th February 2022 - 15:18

This is great!! Thank you!

Mark Jackson

20th February 2022 - 14:25

I'm assuming this won't work in version 3.0 so I won't risk using this yet as we are all using 3.0 however once we upgrade our blender versions, I shall most definitely be using this addon! Exciting stuff!

Demeter Dzadik

22nd February 2022 - 15:01

@Mark Jackson It will throw an error in 3.0 since it's trying to call a function that doesn't exist yet in the PyAPI.

Mark Jackson

6th March 2022 - 01:47

@Demeter Dzadik Thanks so much! I'll wait for 3.1 then. Can't wait until we upgrade so I can start using this

Blender Studio

The Creators Who Share.

Facebook Logo Twitter Logo YouTube Logo
  • Films
  • Blog
  • Training
Pipeline and Tools
  • Cloud Rig
  • Blender Kitsu
  • Contact Sheet Add-on
  • Blender Purge
  • Blender Cloud Services
Characters
  • Einar
  • Security Bot
  • Huginn
  • Pack Bot
Studio
  • Terms & Conditions
  • Privacy Policy
  • Contact
  • Remixing Music
  • Blender.org
Loading...