Combination of custom scaling with XYZ scaling

Dear AnyBody Team,

I have a question regarding the combination of two scaling methods.

Specifically, I adapted the pelvis to my desired shape using a .stl file and custom scaling in the AnyBody model. My aim was to modify the shape and consequently all attachment points on the pelvis.

However, I would still like to apply the regular XYZ scaling after adjusting the shape using custom scaling. It appears that when custom scaling is enabled, the pelvis no longer adjusts to any potential size changes of the body when XYZ scaling is also active.

Is this correct, or is there a way to combine custom scaling and XYZ scaling for a single segment?

Thank you very much for your support!

Best regards,
Nikolas

Hi Nikolas,

Yes, it's possible, of course. But the details of implementation will be a bit different for different scenarios.

If you use a model driven with synthetic motion, e.g. StandingModel or something like that, then you can just add a scaling transformation to your pipeline. Something like this:

AnyFunTransform3DIdentity Test = {
  PreTransforms = {&.RBF, &.Rev, &.ScaleXYZ};
};
AnyFunTransform3DIdentity RBF = {};
AnyFunTransform3DIdentity Rev = {};
AnyFunTransform3DLin ScaleXYZ = {
   ScaleMat = diag({2.05,1.0, 1.0}); // Scaling axes match the AnatomicalFrame
   Offset = {0,0,0};
};
Main.HumanModel.Scaling.GeometricalScaling.PelvisSeg.ScaleFunction.Custom = &Test;

In case you use within a MoCap model, then you'd need to create a connection between optimized pelvis sizes and your XYZ scaling function.

Kind regards,
Pavel

Hello Pavel,

Thank you very much for your answer!
I work with the AMMR4.
I'm not quite sure which scaling function I need to refer to in AMMR4.

I would also like to use the MoCap model. How exactly should the connection between the custom scaling of the Pelvis and XYZ scaling be defined?

Many thanks for your help!

Nikolas

Hi Nikolas,

Sorry, typed from the top of my head. It was supposed to be - Main.HumanModel.Scaling.GeometricalScaling.Pelvis.ScaleFunction.Custom

Btw, our latest released repository is 3.0.4. If you are a part of the beta program - it should still work the same.

The connection should be something like that:

  • you do the morphing of your pelvis and find parameters such as pelvis width, height, depth;
  • you find the same parameters, but optimized by your MoCap model;
  • you construct an AnyFunTransform3DLin transform that uses the following proportions to define your ScaleMat: p_width_optimized/p_width_morphed, p_height_optimized/p_height_morphed, p_depth_optimized/p_depth_morphed . Please check the correct order of scaling axes yourself.
  • Then you update the previous scaling function definition by replacing ScaleXYZ from my example with the newly constructed one.

Kind regards,
Pavel