.obj is not displayed

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mary K
Posts: 37
Joined: Mon Feb 24, 2014 9:15 am

.obj is not displayed

Post by Mary K » Wed Nov 04, 2015 9:12 am

Hello there,
i want to add a contact mesh to my Model but when I add the Display Geometry it is not displayed.
I have added another .obj file from the Geometry directory that OpenSim already has and it works well, but mine doesn't work.
Is it possible my .obj file to be invalid for OpenSim somehow?
If yes, how can I check it?
Any other suggestions?

Thanks

P.S.: I have put my .obj file in the ../OpenSim/Geometry directory but still does not work.

User avatar
Mary K
Posts: 37
Joined: Mon Feb 24, 2014 9:15 am

Re: .obj is not displayed

Post by Mary K » Fri Nov 06, 2015 8:14 am

To be more specific what I do is:

Code: Select all

DisplayGeometry * Lat_Meniscus_dg = new DisplayGeometry("../resources/Meniscus_Geometries_obj/Lat_Meniscus.obj");
lat_meniscus_body->updDisplayer()->updGeometrySet().cloneAndAppend(*Lat_Meniscus_dg);
and then not only my display geometry not appears, but the whole model (lower body) disappears!

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: .obj is not displayed

Post by Ayman Habib » Fri Nov 06, 2015 11:02 am

Hi Maria,

I see that you're using the API from C++ so I'm not sure what you mean specifically by the bones/model not showing. Do you write an .osim file and load it in the GUI, or do you use the API visualizer?
The difference is that the GUI has a specific sequence of directories to search for Geometry files (that you can modify) while the API visualizer may use a different strategy/sequence. This is particularly important when you specify relative directory with ".." since you need to know what directory you're running from, and that may even depend on if you're running inside/outside VisualStudio!

Please describe your full pipeline/workflow so we can help you out. In general to isolate whether the .obj file is the problem, you can try copying an obj file from the distribution and see if it does what you expect and then switch to your own obj file.

Hope this helps,
-Ayman

POST REPLY