It was pleasure to meet you.
Yes, it is, of course, possible to combine the MoCap processing model with the subject-specific morphing. I would recommend to use the newest version of the software. But it is also possible to implement the same workflow in the previous versions, may require more work.
I tried to combine the MoCap model with the subject-spedific morphing as exactly the way I learned in Aarborg. I used Anybody 6.1 version and I cannot see any geometrical defferences. I attached the pictures. Please tell me what is wrong.
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:
please check how it is organized in
ammr\Body\AAUHuman\Scaling\ScalingCustom.any
copy ammr\Body\AAUHuman\Scaling\ScalingLengthMassFat.any 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};
};
#else
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";
};
#endif
};
Replace inclusion of the standard LengthMassFat law in
AMMR.v1.6.6-Demo\Application\Examples\MoCapModel\Model\HumanModel.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.
But the reason I used the old version of Anybody is that I am having a difficulty in doing inverse dynamics with Helen Hayes marker set.
I am working in MarkerProtocol.any file of Anybody ver7.1, trying to change the marker name and sRelOpt value. How can I figure out the sRelOpt value? Is there any standard procedure according to the marker type?
You could see the position of relevant markers when you load the model. Normally sRelOpt correction is guided visually. The value itself will not be optimized, but the final position of the virtual marker will be corrected through an sRelOptDelta vector.
I am still struggling with my Mocap Model and I solved the helen reyes marker set problem according to your advice. That means now I can do the inverse dynamics at least. Thank you!
And I moved to the next step which is custom scaling with my own femur and tibia model.
I did exactly same as what I learned at Aalborg university seminar except changing tibia target model to my tibia model. But I became mass visually. So I checked the model and I figured out that the number of nodes and elements is same as each other.
If I want to use my femur or tibia model, how can I solve this problem?
I tried to change the number of element of my tibia model but it didn’t work.
Hi
I am still struggling with my Mocap Model but I solved Helen Reyes Marker set problem according to your advice. That means I can do inverse dynamic analysis at least. Thank you!
Now I am moving to next step which is building my own custom scaling model.
I have my own tibia STL file so I tried to do exactly same as what I learned at Aalborg University. But it did not work. It looks like mass visually. I attached a picture.
I tried with STL binary file and ascii file both and also matched the number of vertices and element of tibia file with tibia source file.
There are normally several possible problems when it comes to the subject-specific scaling:
the input is not exactly as expected (units, positions, files that do not represent actual bones, etc.)
problems in the morphing code (typos, etc.)
problems in the inclusion code (not included as needed, right/left side mixed, etc.)
using mixed approaches, mixed repositories
As you can guess - unfortunately I cannot analyse which one of those problems you are having without seeing and touching the code/input parameters.
But I guess you are trying to reuse the code from the workshop, don’t you?
Are you copying the code directly from the model used in the workshop?
Could you please remind me - was the MoCap model used during the workshop? Are you sure you are using the newest version of the MoCap model?
Hi
Thank you for your reply!
As you said, I reused the code from the workshop.
And as a test, I also reused the tibia source file and tibia target file for test and it worked!
After that I changed just tibia target file to my own one and it did not work!
Hi
Thank you for your reply!
As you said, I reused the code from the workshop.
And as a test, I also reused the tibia source file and tibia target file for test and it worked!
After that I changed just tibia target file to my own one and it did not work!
Hi
Thank you for your reply.
But I don’t understand what you said. What does the “same topology as the STL from the workshop” mean?
You mean the position of component?
In the workshop you created an STL that has the same topology as an AnyBody STL tibia, meaning that the number of vertices, faces are the same for both, and these vertices are located anatomically in the same positions. This assumption was used to automatically extract landmarks from both files and construct a morphing transformation.
If your own STL differs topologically from these 2 - the morphing will not work.
And unfortunately from the STL that you sent me I cannot conclude anything - I would need the AnyBody STL that was provided during the course as well.
According to your words, my own STL file must be matched the vertices and faces and also anatomical position. If I get my own STL file from MRI data, the vertices and faces of the source STL file and my own STL file cannot be matched even anatomical position. (Actually I matched vertices and faces of my own STL file with source STL file by Hypermesh software but I couldn’t match vertices anatomically)
I am little confused.
My question is, How can I apply my own STL file with the code from the seminar? I just thought that it works well with any of STL file with any topology.
Here I attached the sourse and target STL file also from the seminar.
What you did during the seminar (Materialise part) - you morphed a template mesh into the segmented bone using a 3D mapping tool. Once you do that - you can just replace the target STL with yours. I will check your input when I have time, but unfortunately I do not have Mimics Innovation Suite to help you solve the problem.