viser icon indicating copy to clipboard operation
viser copied to clipboard

Mesh rendering with vertices normals (smooth)

Open Yvan-iComat opened this issue 4 months ago • 2 comments

Hello,

I would like to render the meshes avoiding 'facetted' aspect in viewer.

I know that threeJS handle this by using normals at mesh vertices (if all vertices are well condensed/merged). Could you please support this for next versions ? or maybe indicate me how I can do this myself (fork) ?

Thank you

Image

Yvan-iComat avatar Aug 25 '25 08:08 Yvan-iComat

Hi @Yvan-iComat! Can you share a reproduction for the behavior you're seeing?

Our add_mesh_simple() implementation does have a flat_shading argument, which defaults to False. Is your problem with GLB and/or trimesh objects?

brentyi avatar Sep 03 '25 07:09 brentyi

Hi @brentyi basically, using the URDF visualizer test case (with pandas robot), you can notice that shading looks flat : since shading is supposed to be smoothed by default, I don't understand.

Image

NB: this robot model does not look so 'tesselate' in general, but it is because meshes are quite fine, limiting this effect. I do have another robot model with coarser meshes, and the effect is more accentuated.

Yvan-iComat avatar Sep 03 '25 08:09 Yvan-iComat