Pose-space deformation

Hi, can anyone take a look at this?

https://s14.postimg.org/s82ujaue9/driver_posebased.gif

Scene download: pose_space_deformation.blend (583 KB)

I think using drivers is a way to implement that “pose-space deformation” technique seen in Maya and others, as explained here:

It’s when you activate corrective shapekeys based on the position of bones relative to each other, rather than their rotation. This way you avoid having weird rotations not activate the drivers.

The driver expression is this:

max( ( ((sourceX-pivotX)*(targetX-pivotX)) + ((sourceY-pivotY)*(targetY-pivotY)) + ((sourceZ-pivotZ)*(targetZ-pivotZ)) ) / (source_pivot_distance*target_pivot_distance), 0 )

It’s a dot product, and the variables are the world-space coordinates of the bones involved.

It’s just an experiment, I imagine that as it is it’s too heavy for a production rig that would use a lot of drivers like this. You need 11 variables per corrective shape-key.
Hopefully someone can find a way to optimise it etc., maybe taking the bone positions as properties so you don’t need as many variables or something. EDIT: this is certainly possible with a custom function as the driver expression.

Turn off your shape key and turn on preserve volume in the armature modifier. I think this is what you are after.

Oh, it’s supposed to look like that, it’s a weird shapekey so it’s more clear what’s happening, like a proof-of-concept. It’s being activated by the angle between the lines formed by three objects:

https://s4.postimg.org/u2qgp1w2l/blender_Pose_Space_Def.png

It’s as an answer to these threads:

Like in that YouTube video for Maya, those three objects could be an elbow joint, a shoulder joint and some empty that you position inside the torso: when the elbow gets close to that empty (so the armpit is crushed and needs correction), the value in the driver increases, so you use that as the value of the corrective shape-key and it’ll be activated whenever the arm goes near the torso.
I think the only reason this is done (that is, the only reason “pose-space deformation” is used) is that using bone rotations as the drivers can break some setups when the bones may rotate over 360 degrees – the mesh will look fine but the driver values will be off.