Site icon Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

A Discussion on the subject of Bone Deformation Hierarchy

LearnMMD.com _ MikuMikuDance MMD Tutorials

A Discussion on the subject of
Bone Deformation Hierarchy

On Sun, 3/19/17, Trackdancer2015 wrote:

Mr. Bandages,

I was wondering if you could clarify something for me, please?

In the PMDe/PMXe under the bone tab, there is a field for a value called Deform Hierachy (Deform hier. in the PMDe UI).

So next to this label is a field and a toggle that reads “After ph” (after physics calculations presumably).

The question is what exactly does this value do?

Most bones have this value set as “0”. In some models this value is set at “1” or higher, usually in association with IK chains or bones with linked structures like the eyes. But this practice is inconsistent across models.

My assumption is that the bone hierarchy value is used in the calculations MMD uses to calculate the position of the bones and affects when this calculation occurs relative to when it does the calculations for the other bones. So a bone with a deform hier. of “0” is processed before a bone with a deform hier. >1, etc. Or is it the other way around?

In either case, am I even understanding the function of this value correctly?

—————————

On Sun, Mar 19, 2017 at 3:32 PM, Bandages wrote:

You’re understanding it correctly.  Many unnecessary words follow because I enjoy details….

Deformation hierarchy affects when the bone’s position is calculated.  You’ll see this used most often on eyes– Tda Miku, for instance, uses deformation tier 2 on its eyes in order to incorporate a deformation tier 1 both-eye bone that’s placed later in the bone list.  Basically, MMD runs through the bone list, in order, skipping any with tier>0; then it runs through again, skipping any with tier>1; then it runs through again…  until all tiers have been evaluated; then it runs physics and applies those that to physical bones, in order; and then it runs through after physics bones, in order.

I can’t say that I have a perfect understanding of deformation tier.  The obvious question is, why use deformation tier instead of just bone order?  There are counter-intuitive things that you can do when, for example, doing looped appends using deformation tier, but I’ve only experimented with these in PMXE, not MMD, and when it comes to deformation tier, PMXE and MMD aren’t always in full agreement.  Besides which, looping appends isn’t going to do anything to make animation easier; it’s just a weird thing you can do.

If you have IK bones that depend on other IK bones, you sometimes have to increment the deformation tier for the later IK bones rather than just placing them later in the list.  I’ve run into these issues when making IK eyes (designed to track a move bone that could be OP’d to anything you wanted), and I’ve run into them when making shadow skeletons that use IK bones to measure angles created by IK bones in order to set IK bones for the output skeleton, lol.  These aren’t things that any reasonable model should ever run into, but people trying to adapt ripped models sometimes run into them, because those models are often designed with different skeletal systems in mind.  (In the end, I’ve never been particularly happy with the really ambitious bone stuff I’ve tried; I now think it makes a lot more sense to skip MMD and move to a different animation program rather than try to bludgeon MMD into doing things it was never designed to do.)

Most people should probably avoid deform tier.  Even with Tda Miku, all bones could be placed at tier 0, and all you’d have to do is rearrange the bones in the list.  I have helped a few people who’ve had problems just because they were using imported bones with unnecessary deform tier and didn’t really understand it.  It’s easy to import a deform tier 1 bone and wonder why it’s not working as a parent (to a deform tier 0 bone).  On the other hand, it’s also easy to hang a bone off of an IK-controlled bone and fail to understand why it works when IK is off and doesn’t when IK is on….

Presumably, “after physics” works just like you’ve described– that it runs physics, then uses the orientation determined by physics to determine the positions of after-physics bones that are children of the physical bones.  I can’t remember how much experimentation I did with it, if any.  It didn’t strike me as something that would be useful.  Maybe you could attach a bow to hair, while allowing some user specified orientation of the bow?  Maybe you could allow some hybrid physics + IK control of long hair though some complicated system?  Not sure.

——————–

—–Original Message—–
From: Trackdancer2015  Sent: Tue, Mar 21, 2017 7:50 pm

Some more info thanks to Maddoktor2. I do have his permission to reproduce what he sent me. Also, what he calls Grant parent is the Gr parent field.:

———-
Trackdancer said the following:

Can I share your findings with some of the people at LearnMMD? I think they will be very interested in what you discovered.

Maddoktor2 said the following:

Sure thing.
Oh, and it also works on 3DCG models as well.
3DCG models have 3 Upper body bones, so you have 2 options: either rig the first Upper Body bone as an additional Lower body or do nothing at all to it. Either way works because both bones occupy the same coordinates inside the model with the main difference being the directions their tails point [because of how they’re rigged, naturally].
That they occupy the same coordinates is precisely why either method works with those particular bones.
Also, you treat the 3DCG Upper Body 2 and 3 bones as Upper Body and Upper Body2 bones and assign them their respective grants.
Again, this works due to their relative positioning in the body and their respective weighting schema.

The most important thing is to take note of a bone’s relative position inside the model’s body. That determines which grant settings it requires in order to function properly.

The Lower body, head and neck, and Shoulder P receive their new grant settings normally as per the procedure.
I built 2 versions of her – one with the upper body bone rigged with a lower body grant and one in which the bone was left completely alone.
Both versions work perfectly. ;)

Feel free to pass on the additional info that this mod will work on ‘ripped’ models, even though 3DCG was designed with co-usage with MMD in mind, and therefore cannot technically be considered as rips – not when they come from a game designed to create models and parts compatible with MMD, they sure as heck don’t! Instead, they are ports, which is why I always refer to my 3DCG models as “Ports”. ;)

I hope this additional info helps too. =)

———-
Maddoktor2 said the following:

Added note:
I can confirm the procedure for deform ordering in models with incorrect bone ordering unlike Luka’s, rewuiring deform settings of 3 and 4 for some bone sets – 3 for IKs, and 4 for the eyes.. Here’s the story behind it:
VenusSempai’s new SeeU was having exploding hair problems. he sent her to me to look at. I repaired the grant ordering in her hair and she worked after that.
Fast forward a couple of weeks: Ven just got her back from someone who had alerted hinm to some joint issues that needed fixing. Not knowing if it was hair-related, I sent him a note asking about what the final verdict was on that, and he told me that nothing needed to be done to her hair after I fixed it.
I DL’d SeeU today to check her final version out, and while I was going through her hair I noticed while scrolling to it that some of her bones had deform settings of 1 and 2.
I couldn’t resist. I repaired her leftover frame errors (and a good thing I did, because the parent settings for her eyes turned out to be incorrect), and then installed the breather mod using the “make everything 2 and then add 2” method.
It worked. I sent him a copy of her, so he’ll see it when he gets back online.
It took less than 25 minutes including translating the new bones to English first thing after the mod was installed.

So I can confirm that the method used in the video does indeed work.
Hope that helps. =)

Have fun with MikuMikuDance!

 


– SEE BELOW for MORE MMD TUTORIALS…

— — —


– _ — –


Exit mobile version