timetocode

Preserving volume in animations that deform meshes

Recommended Posts

In a blender armature modifier there is a setting called "Preserve Volume" which basically stops meshes from collapsing on themselves in some bone-related animations. I'm a newbie animator, but I'm aware that there is more to joints+deformations than just checking the preserve volume box and hoping things look good. This is particularly relevant given that some game engines, such as our beloved BabylonJS (also Unity) do not have this feature. So the question here is really what techniques do people recommend for keeping joints rotating/bending and looking nice in Babylon?

An extreme example of volume being preserved versus not preserved occurs when twisting a model comprised of two cubes and two bones. With volume preserved we get what appears to be the twisting of a square column:

2018-08-21_12-36-09.gif.f71b2ed097646a4ebe0f020e3354501c.gif

Without volume preserved, we get twisting that collapses in the vicinity of the joint, creating something like an hourglass:

2018-08-21_12-39-55.gif.e511cc20302885305b74326dfa2f61b6.gif

If the twisting motion continues the central joint will get all the way squished:

blender_2018-08-21_12-49-46.png.e9e4f6ce2171a033e29ec3ded244fd3a.png

Something similar occurs in other twists such turning a head, in certain shoulder rotations, in internal/external leg rotation at the hip, and probably a bunch of other scenarios. A milder deformation occurs in movements that are mostly single-dimension rotations such as a knee or elbow bend.

 

Share this post


Link to post
Share on other sites

This is not really a Blender question.  Basically, all a bone is in BJS is a matrix & bone length which is only used as an aid.  I am not sure, but thought about removing some of the weight around each side of a joint (actually programmatically).  Reminds me, @Deltakosh, what happens if the sum of the weights is less than one?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.