How to remove the visualization of a triangular mesh on objects and make a realistic rendering of objects?

70 views Asked by At

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:

Visualization in Meshcat

But in MeshLab model in .obj+.mtl seems like this: Model in MeshLab

And in CAD-system my model semms like this: Model in CAD-system

  1. How to get a more realistic rendering of a model in a meshcat without visualization triangles on the surface?

  2. 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?

  3. 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.

Edited OBJ file MTL file

1

There are 1 answers

4
Sean Curtis On BEST ANSWER

Open your obj file and answer the following questions:

  1. Do you have lines that start with vn?
  2. On the lines that start with f do they have lines like f 1 2 3 or f 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.