Page MenuHome

New normalization mode in armature modifier for use in layered deformation

Authored by Joseph Eagar (joeedh) on Sep 14 2015, 9:06 AM.



A new normalization mode was added in the armature modifier. Useful for additional layers of deformation in a mesh.

Diff Detail

rB Blender

Event Timeline

Joseph Eagar (joeedh) retitled this revision from to Add option to not normalize armature deform weights. .
Joseph Eagar (joeedh) updated this object.
Joseph Eagar (joeedh) set the repository for this revision to rB Blender.
Joseph Eagar (joeedh) updated this object.

Remove code that kept verts affected by single weight groups from being normalized, as this breaks existing rigs.

This is more of a design topic.
Would like to see examples where this is giving real benefits, as well as feedback from animators/riggers.


The term Real is a bit fuzzy here, Absolute Weights, or flipping the boolean and calling Normalized Weights ~ make more sense IMHO.

Yeah I've requested this functionality (not quite there yet but we're talking on IRC). The purpose is to automate the messy workaround needed to do layered deformations. This video explains it:

This shows the effects achieved with layered deform on another character

This is based on multiple armatures & multiple armature modifiers layered in the same mesh.

Joseph Eagar (joeedh) edited edge metadata.

Reworked patch. Now, if new option 'layered weights' is enabled, vertices only affected by one deform group will not be normalized.

So, from the looks of it we still need to normalize if there are more than one groups affecting a vertex.

From tests, looks like the easiest way is to use something like this:

if (contrib > 1.0)
    contrib = 1.0 / contrib
   contrib = 1.0;

This introduces a discontinuity, which one has to blend around:

fac = (contrib - (1.0 - margin*0.5)) / margin;
fac = clamp(0.0, 1.0, fac);

//smooth derivatives.  should probably use metaball
//equation.  approximating with smoothstep might be faster
fac = fac*fac*(3.0 - 2.0*fac); //degree three smoothstep

contrib = 1.0 + (1.0/contrib - 1.0)*fac;

There are two parameters here: one is the blend width, the other is how the derivatives are smoothed (ideally, at fac=[0 or 1] all derivatives should be zero). I'll upload a patch later with options for both (I have code somewhere for smoothstep up to like 12th or 13th order, and I can also add option for metaball exp()-based equation, too).

For more explanation of blending over discontinuities and the issues involved see:

I think this is basically the same problem.

Layered Weights is now a different normalize mode. It uses method in previous comment.

Initial tests give me exactly what I expected. This eyelid is weight-painted with NO counteracting base weight whatsoever!

Here's a video of this patch in action.

I'm using it for a rigging job ATM and I'd like to avoid the tedious work of doing a "counteraction" weight group. I think this is only missing a better name. This could have saved a ton of time during gooseberry rigging since the caterpillar and Tara are multi-layered rigs.

Can we get some comments from the other reviewers? @Joshua Leung (aligorith) @Hjalti Hjálmarsson (hjalti) @Nathan Vegdahl (cessen) @bassam kurdali (bassamk)

Daniel Salazar (zanqdo) retitled this revision from Add option to not normalize armature deform weights. to New normalization mode in armature modifier for use in layered deformation.Sep 18 2015, 3:06 AM
Daniel Salazar (zanqdo) updated this object.

I have created a quick test file, move the bones around, see how they behave. Turn of Layered Weights and see the horrors.

As I mentioned I'm also working on a real rig and it works fine. My only suggestion would be to remove or comment the filtering options which seem to unnecessarily obfuscate the UI. Or provide a test file where that feature is necessary.

Hi sorry for the really late reply - I built the patch and tested.
I don't have a problem with this personally, it might be tricky to find a good wording for the option. "Layered Weights" is a bit vague, I actually thought this was about a totally different feature Daniel had been proposing on IRC.

Some suggestions: Since this option really 'doesn't do something' that blender used to do, maybe it should be inverted, i.e. have an option like:

"global normalization" defaulted to ON - that does what the modifier currently does - turn it off and you get the proposed 'layered weights' option.

The tooltip for global normalization could say something like "normalize modifier weight aggregates to 1 to avoid leaving vertices behind" or something like that.

@bassam kurdali (bassamk) I like that. IMO we're still missing an example of how the smoothing is useful.

bassam kurdali (bassamk) edited edge metadata.

I think this is OK as is from a user perspective - it adds an option that makes things simpler for some use cases, and keeps the defaults working.
Example use:
using a deform armature with spline-IK - modifier on top of stack
using another armature for spline twist - modifier on bottom of stack

both armatures controlled via controls armature, deform armature also via spline IK

for the spline twist, this allows to just weight what you want to be affected by twist, and not worry about making a 'static bone' for non moving parts.

This revision is now accepted and ready to land.Jan 29 2016, 1:16 AM

so I'd suggest splitting the patch into two:

  • the no normalization option (without smoothing)
  • the smoothing option on top

and commit only the first one.
reasoning is:
there's a use case for the former, but as a rigger, I'm not sure where I'd use the latter; it might be that laplacian deform or corrective smooth does the trick here anyway, if needed?
if it comes up as a need, then it's possible to then commit the smoothing as a second patch, as a result.

Any chance this could be considered for 2.79, before the long stretch to 2.8? @Joshua Leung (aligorith) @bassam kurdali (bassamk)