Import of model into Opensim

OpenSim Creator is open-source software for creating/modifying OpenSim models, available at https://opensimcreator.com

<img src="https://opensimcreator.com/img/gallery/0.5.0_Gorilla.png" alt="screenshot" />
POST REPLY
User avatar
Jing ZENG
Posts: 3
Joined: Mon Jan 08, 2024 6:40 am

Import of model into Opensim

Post by Jing ZENG » Wed Apr 03, 2024 5:47 am

Hello,

Thanks for developing this helpful platform. I'm a master student interested in musculoskeletal multibody modeling. I recently created a patient-specific model, using Opensim Creator software. I used mesh importer to import meshes reconstructed from CT scans, add bodies and finally add several muscles. However, I got one problem when I try to import the model into Opensim in order to simulate some gestures. I find in .osim file that there is no geometry attached to my model. But when I established my model, I had meshes for every body. It turns out that these meshes are below offset frame of each body.

How could I visualize my model in Opensim?

I will appreciate any kind help.

Best regards,
Jing

User avatar
Adam Kewley
Posts: 4
Joined: Mon Sep 21, 2020 2:37 am

Re: Import of model into Opensim

Post by Adam Kewley » Wed May 01, 2024 1:48 am

(apologies for the late reply, but this is a common question - I'll port it over to GitHub discussions etc. as part of building up OpenSim Creator's FAQ/support platform, which I haven't established yet :().

The mesh importer automatically adds offset frames between each mesh and its associated body. This is to handle the case where meshes aren't body-centered (common when importing raw meshes from devices). It shouldn't cause an issue with either OpenSim Creator or OpenSim.

Another thing the mesh importer does, though, is use absolute paths for mesh files. This is because both OpenSim and OpenSim Creator's .osim editor needs to find the mesh files, and many users tend to keep their mesh data somewhere else on their computer (which OpenSim cannot automatically deduce). The side-effect of this is that your `.osim` file will initially contain paths like `C:\Users\adam\Documents\CTScans\Femur.obj`, which will work fine on your computer but may not work when ported to a different computer.

If you believe that's your problem, then the fix is to create a "portable" osim directory. Effectively, this entails creating a directory containing your .osim file and a `Geometry/` folder in which all mesh data is placed, followed by dropping the absolute part of each mesh file's path (e.g. C:\Users\adam\Documents\CTScans\Femur.obj --> Femur.obj). Both OpenSim and OpenSim Creator automatically search this directory when looking for geometry files.

POST REPLY