Skip to content

Commit

Permalink
compute vertex normals if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
zhan-xu committed May 19, 2021
1 parent 2d329ee commit 490b0a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gen_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def genDataset(process_id):
info_filename = os.path.join(dataset_folder, 'rig_info_remesh/{:d}.txt'.format(model_id))
remeshed_obj = o3d.io.read_triangle_mesh(remeshed_obj_filename)
remesh_obj_v = np.asarray(remeshed_obj.vertices)
if not remeshed_obj.has_vertex_normals():
remeshed_obj.compute_vertex_normals()
remesh_obj_vn = np.asarray(remeshed_obj.vertex_normals)
remesh_obj_f = np.asarray(remeshed_obj.triangles)
rig_info = Info(info_filename)
Expand Down

0 comments on commit 490b0a3

Please sign in to comment.