# Issue with "Preserve volume" and rotation over 180 degrees

Ok i’ve been trying to use preserve volume to simplify rigging a (cartoony) eyelid. It does exactly what I expected it do; making the weighted vertices follow the path of the bone (i.e. keep the volume) instead of simply averaging out between the bones the vertices are weighted to and thereby collapsing the mesh.

So, super excited about that since it seems to imply I can greatly simplify some stuff. However, once the bone rotates over 180 degrees it “flips” the mesh. It looks like it scales it -1 along the local Z.

Now there is some talk in the documentation about this magic 180 degrees value but, unless I misinterpret it, it should NOT lead to the complete mirroring of the mesh.

Am I doing something wrong here or can I just forget about using “Preserve volume” with bones that rotate over 180 degrees?

I appreciate any tips.

PS
The image is a gif, if you click on it, it will enlarge and play showing the problem at hand.

seems logical to me, it stretches the mesh between the horizontal bone and the other ones, you’d better create several bones that have a Copy Rotation constrain and follow the rotation of the first one, maybe my answer here will help.

Thanks Moonboots.

What you suggest is a solution, however its one I hoped I could avoid by using volume preservation. The behavior that occurs is not logical to me and neither does it fit with what preserve volume is supposed to do.

As you can see when it rotates less than 180 degrees the deformation actually follows the bone path, without the help of additional bones, which is exactly how it should behave. That is what the entire magic of volume preservation is about. Instead of vertices simply being placed in between the bones they are weighted to they actually follow the motion paths of those bones instead.

So while you supplied a workaround, it does not really answer my question on whether volume preservation is broken/has a known shortcoming or whether I use it wrong. It wouldn’t surprise me if it was broken but I’d rather know for certain so in the future I know whether I can safely use volume preservation or not.

Thanks for trying to help me though

If you look at the math for “dual quaternion skinning” (preserve volume), it’s perfectly logical. Obviously-- math is math. The issue is that you’re adding your own interpretation on top of that math, in place of it, and your own interpretation isn’t quite accurate.

Rotations through 180 degrees are a known limitation of quaternion skinning. It is a shortcoming, yes, but it is not a bug.

The workaround is, don’t rotate bones through 180 degrees. It is rarely necessary to do so anyways-- there is no part of a human body, for example, that does that. Frequently, you can solve issues with quaternion skinning and big rotations by considering a different rest pose. For example, if you want crazy leg angles, knees to shoulders, don’t give your model a T pose-- instead, use a model where the rest-pose legs are rotated to the center of all intended orientations. Then, they’ll never have to rotate through 180 degrees.

1 Like

Thank you for enlightening me! I am definitely not going to argue with math; I was not aware it was an inherent limitation of dual quaternion skinning. Quite frankly neither would I have figured that out on my own without you explicitly telling me so I’m very grateful you decided to share. I am fine with chalking this one up to my own ignorance. Its not the first time nor will it be the last.

Now that I know it is an inherent limitation and that as long as I stay within range the skinning will be stable I can selectively choose where and when to make use of it. You are correct that there are many places where such a big rotation angle isn’t needed at all.

I guess it was my bad luck that my initial testing with it happened to be on a cartoon eye where the lid comes from the back and actually does need to rotate over 180 degrees. It was just a rough prototype though and subject to change so I am certain I can work something out (like just not using Quaternion in this case and fan out multiple bones with copy rotation constraints).

Thanks again for sharing what appears to be a no brainer for you. It wasn’t for me.

Sorry if that sounded mean. I don’t think there’s anything wrong with not knowing something. That’s why these forums exist, right?

I think you can solve your eyelid problem using a technique similar to the one I mentioned. Pose the bone in the center of likely orientations (because the eyelid pointing at the back of your head is a very unlikely orientation), apply the armature modifier, and apply the pose as rest pose.

1 Like

Don’t worry bandages, I didn’t take it in a bad way at all! Sorry for the confusion.

You are absolutely right a more normal eye that’s set into a proper face won’t ever need a range that exceeds 180 degrees.

I am playing with a more cartoony eye however that can also separate from the character. The eyelid would then originate from the back of the eye, combined with some scaling or a morph to make the appearance more organic. Hence why I started with an admittedly outrageous range for an eyelid.

It was just an unlucky coincidence that the first time I tried to work with preserve volume was with a use case such as this. Like I stated above, the design is not at all set in stone and there are other ways to make it work.

It was incredible to see volume preservation work though! Its like magic when you rotate the eyelid with a -single- bone and with some smooth weight painting the falloff actually follows the motion path of the bone.