Page 1 of 1

.obj is not displayed

Posted: Wed Nov 04, 2015 9:12 am
by mariakrgrg
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.

Re: .obj is not displayed

Posted: Fri Nov 06, 2015 8:14 am
by mariakrgrg
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!

Re: .obj is not displayed

Posted: Fri Nov 06, 2015 11:02 am
by aymanh
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