I trid to get realistic visualization of objects in Meshcat: I export 3d model from CAD-model to .obj with .mtl files by using MeshLab program. And when I set .obj file in .sdf I get like this in meshcat with visualization of triangles and not with clear boundaries:
But in MeshLab model in .obj+.mtl seems like this:
And in CAD-system my model semms like this:
How to get a more realistic rendering of a model in a meshcat without visualization triangles on the surface?
In documentation I found commands SetTriangleMesh() and SetTriangleColorMesh(), but I'm not sure if this is what I need. Are there any examples of using these commands?
I found a very realistic representation of a dish drainer here but how does it works?
To model contact I'm using a simplified model and question only about visualization of models.
Open your obj file and answer the following questions:
vn
?f
do they have lines likef 1 2 3
orf 1//1 2//2 3//3
(the actual integer values are unimportant. The question of whether there are slashes or not is what is important).The hypothesis we're targeting is that your obj has not explicitly defined its surface normals, so each visualizer (meshcat vs meshlab) is applying its default logic. Making sure that your obj has explicit normals is the first step to guaranteeing a uniform appearance.