I'm using Open3D to create mesh, and on the official web we can compute triangle normal of triangle mesh, but how to visualize the normal of the surface?
Thank you for the help
I'm using Open3D to create mesh, and on the official web we can compute triangle normal of triangle mesh, but how to visualize the normal of the surface?
Thank you for the help
once you have calculated the normals, you can render the normals by pressing ctrl + 9
in the visualizer, e.g.
import open3d as o3d
mesh = o3d.io.read_triangle_mesh('path_to_mesh')
mesh.compute_vertex_normals()
o3d.visualization.draw_geometries([mesh])
This will give you something like this: If you want to see the vertex normals as lines, I'm not sure this is supported in open3d for meshes yet. But you can convert the mesh to a point cloud:
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(np.asarray(mesh.vertices))
pcd.estimate_normals()
and then visualize the normals by pressing n
in the visualizer. This will give you something like this:
© 2022 - 2024 — McMap. All rights reserved.