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.
.obj is not displayed
Re: .obj is not displayed
To be more specific what I do is:
and then not only my display geometry not appears, but the whole model (lower body) disappears!
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);
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: .obj is not displayed
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
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