Page 1 of 1

Scaling model - Bodies not rendering

Posted: Thu Feb 20, 2020 11:01 am
by bradkerst
I was working with the HYOID Model https://simtk.org/projects/neckdynamics trying to scale the model for my subjects. The model that was produced was missing some bodies: lscapula, rscapula, spine, clavicle, rclavicle, and cerv7 bodies were not rendering after the attempted scaling. I haven't found the problem elsewhere and was hoping someone had seen this before or has an idea of how to fix it.

Thank you!

Re: Scaling model - Bodies not rendering

Posted: Thu Feb 20, 2020 11:56 am
by aymanh
Hi Bradford,

Let me explain the root cause of the problem and suggest solutions/workaround.
The root cause of the problem is that models do not embed their mesh files within them, instead they refer to mesh files by name. The application uses the following mechanisms to locate the meshes:
1. Look for mesh files in local geometry folder (under the model)
2. Look for mesh files in the "geometry search path" specified under the Application's Preferences tab.

In your case, the model has geometry that is not in the default search path. When the model is loaded the meshes are located using mechanism 1 above.

Scaling creates a new model in memory that has no associated file/folder, accordingly meshes can not be located using mechanism 1, however some meshes are located based on mechanism 2 and hence are displayed.

What we typically recommend for users working on a model that has custom geometry/meshes is to: prepend the folder containing the meshes to the geometry search path under the application preferences tab. This will allow the meshes to be located always using mechanism 2, and so the scaled model will show all meshes.
Alternatively, you can save the scaled model to the same folder as the original model and then load it and the meshes will show up. However, considering that scaling is an iterative process, this seems less convenient and more error prone.

Please let me know if that explains and if the suggested solution/workaround works for you.

-Ayman

Re: Scaling model - Bodies not rendering

Posted: Fri Feb 21, 2020 1:19 pm
by bradkerst
Hi Ayman,

I changed the search path to the local geometry, and the bodies are now rendering. I was also able to get it to work by adding the mesh files to the default search path. Thank you for your help!

-Brad