View Single Post
Old 12-07-2017, 12:15 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
Join Date: Oct 2010
Posts: 931

Hi Bokku,

The MoCap models in the previous versions of AMMR (<2.0) use a slightly different approach to constructing a human body model. In particular, the anthropometric scaling law is included locally from the MoCap model folder, which means it does not share the mechanism of inclusion of the subject-specific morphing functions. We would recommend switching to the latest version of AMMR and AMS because it would save you time implementing this on your own as well as you would be using the new MoCap processing framework, which is much easier to use in general, and should save you a lot of time in the long run.

But if you want to still try - here are the steps:
1. please check how it is organized in
2. copy ammr\Body\AAUHuman\Scaling\ y into your custom MoCap/Model folder and change it accordin to #1 for relevant segments, for example something like that for Shank (please check paths, I have not checked):
      AnyFolder Shank = {
        AnyVar LengthScale  =...AnthroSegmentLengths.Right.ShankLength / ...StandardParameters.Right.Shank.Length;
        AnyVar ms = ...MassScaling.Right.Shank.MassScale;
        AnyVar ls = LengthScale;
      #ifndef CUSTOM_SCALING_Right_Shank
        AnyFunTransform3DLin ScaleFunction = {
          ScaleMat = {{(.ms/.ls)^0.5, 0, 0},{0, .ls, 0},{0, 0, (.ms/.ls)^0.5}} ;
          Offset = {0, 0, 0};
        AnyFunTransform3D &TSeg2ScaleFrame = ....BodyModel.Right.Leg.Seg.Shank.Scale.T0;        
        /// The rigid body transform from segmental to scaling reference frame
        AnyMessage scaling_message_Right_Shank = 
          TriggerPreProcess = On;
          Type = MSG_Warning;
          Message = "Custom scaling for 'Right.Shank' segment is used! Please specify a scaling law should an 'Unresolved object' error occur";

3. Replace inclusion of the standard LengthMassFat law in
AMMR.v1.6.6-Demo\Application\Examples\MoCapModel\Model\HumanMo del.any
to use the local modified one:

//#include "<ANYBODY_PATH_BODY>\Scaling\ScalingLengthMassFat.any" 
  // include local modified one
  #include "ScalingLengthMassFat.any"

I hope this helps, but as you see - it might be just easier to switch to the new repository.

Kind regards,
Reply With Quote