Forums Anyscript.org  

Go Back   Forums Anyscript.org > Professional Forum > Debug model

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2017, 06:41 PM
Zach_Welshman Zach_Welshman is offline
Member
 
Join Date: Sep 2016
Posts: 39
Default GMFoot MoCap and RBF Scaling

Hello, I've been trying to get the GM foot model to run with the suggested RBFLandmark scaling for each individual bones. I can scale and morph each bone with the GMFreePosture Model, but would like to incorporate this with gait data. I've attached my model in a zip file below.

When i run my model it returns with:
Code:
ERROR(SCR.SCN6) :   D:/D..s/A..s/A..y/Body/A..n/B..s/G..t/BodyModel.any(37)  :   'TRUNK' :  Unexpected character.
Model loading skipped
Thank you for any help you can provide.
Thanks,
Zach
Attached Files
File Type: zip MoCap-GMFootZW.zip (2.98 MB, 17 views)
Reply With Quote
  #2  
Old 02-28-2017, 02:07 PM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 948
Default

Hi Zach,

I am sorry for the late reply.

Unfortunately the structure of the MoCap models is a little different from other models. You need to do a few modifications to make it work with the subject-specific scaling functions.
1. Please copy Body\AAUHuman\Scaling\FootScaling\ScalingLengthMas sFatRBF.any into the Model folder.

In MoCap-Model/Model you need to find HumanModel.any and change the path to be relative and looking at the file that you copied:
Code:
//     #include "<ANYBODY_PATH_BODY>\Scaling\FootScaling/ScalingLengthMassFatRBF.any"
   #include "ScalingLengthMassFatRBF.any"
2. In ScalingLengthMassFatRBF.any for the segments that you individualize you would need to define a block like the example below:

Code:
      
      AnyFolder Thigh = {
        AnyVar LengthScale  = ...AnthroSegmentLengths.Right.ThighLength / ...StandardParameters.Right.Thigh.Length;
        AnyVar ms = ...MassScaling.Right.Thigh.MassScale;
        AnyVar ls = LengthScale;
        
        #ifndef CUSTOM_SCALING_Right_Thigh
        AnyFunTransform3DLin ScaleFunction = {
          ScaleMat = {{(.ms/.ls)^0.5, 0, 0},{0, .ls, 0},{0, 0, (.ms/.ls)^0.5}} ;
          Offset = {0, 0, 0};
        };
        #else
        
        #endif
        
      };
    }; // Right
This block of code should exclude ScaleFunction if CUSTOM_SCALING_#SIDE#_#SEGMENT# is specified.

This should be sufficient. Please let me know if that makes sense and you can make it work.

Kind regards,
Pavel
Reply With Quote
  #3  
Old 03-06-2017, 04:05 PM
Zach_Welshman Zach_Welshman is offline
Member
 
Join Date: Sep 2016
Posts: 39
Default GMFoot MoCap and RBF Scaling

Hi Pavel, again thank you for your time, I see where the differences exist between the free posture and the mocap models.

I've completed the changes and the model is returning:

Code:
Closing model...
Deleting last loaded model...
...Model deleted.
Loading  Main  :  "D:\Documents\Anyscripts\AMMR.v1.6.2-MyDemo - Copy\Application\Beta\MoCap-GMFoot\MoCap-GMFoot.main.any"
Scanning...
Parsing...
Constructing model tree...
Linking identifiers...
Evaluating constants...
ERROR(SCR.EXP0) :   D:/D..s/A..s/A..y/A..n/Beta/M..t/M..l/Environment.any(53)  :   'sRel'  :  Error in expression. Please refer to the following error messages for details ...
ERROR(SCR.EXP.FUN.EXT8) :   D:/D..s/A..s/A..y/A..n/Beta/M..t/M..l/Environment.any(37)  :   LocationFunction  :  Exception in Python extention module.
  Python error : 
Model loading skipped
The Python file FootLocation4 is already in the model folder.
I look forward to your reply.
Many Thanks,
Zach
Attached Files
File Type: zip MoCap-GMFootZW2.zip (4.74 MB, 2 views)
Reply With Quote
  #4  
Old 03-07-2017, 11:52 AM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 948
Default

Zach,

I tried and got the same error. And it seems that you may be using Python 3 and it has changed a couple of functions. Please try this correction, it worked for me.

Kind regards,
Pavel
Reply With Quote
  #5  
Old 03-07-2017, 11:53 AM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 948
Default

Please rename it into .py
Attached Files
File Type: txt FootLocation4.txt (10.1 KB, 4 views)
Reply With Quote
  #6  
Old 03-07-2017, 12:33 PM
Zach_Welshman Zach_Welshman is offline
Member
 
Join Date: Sep 2016
Posts: 39
Default GMFoot MoCap and RBF Scaling

Thanks Pavel, the model is loading now. As you can probably see too, there seems to be a problem with the location rest of the foot, but I will investigate this further when i try an individualise more bones into the GM model, perhaps this will adjust the foot when these bones are morphed.

Thanks for your help Pavel.
Zach
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:45 AM.