Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Write OBJ can not include triangle normals

Open thomas134340 opened this issue 4 years ago • 8 comments

Hi, I'm trying to convert a point cloud to mesh via BPA, and need the output in obj format. However it says "write obj can not include triangle normals", and the output is stored incorrectly. My current solution is to save it as .ply and then convert it to .obj via other software. Does anyone know why this problem is appearing, and how I could solve it?

thomas134340 avatar Jan 22 '21 03:01 thomas134340

I have this issue also - is there a solution?

RecursiveAV avatar Feb 17 '21 12:02 RecursiveAV

Same here

DenisTome avatar Apr 06 '21 17:04 DenisTome

Does setting mesh.triangle_normals = o3d.utility.Vector3dVector([]) fix the issue?

Complete example:

import open3d as o3d
mesh = o3d.geometry.TriangleMesh.create_box()

mesh.compute_triangle_normals()
o3d.io.write_triangle_mesh("mesh.obj", mesh) # Gives the warning "[Open3D WARNING] Write OBJ can not include triangle normals.", but still writes the file.

mesh.triangle_normals = o3d.utility.Vector3dVector([])
o3d.io.write_triangle_mesh("mesh.obj", mesh) # Writes the file without any warnings.

kongsgard avatar Apr 07 '21 06:04 kongsgard

Does setting mesh.triangle_normals = o3d.utility.Vector3dVector([]) fix the issue?

Complete example:

import open3d as o3d
mesh = o3d.geometry.TriangleMesh.create_box()

mesh.compute_triangle_normals()
o3d.io.write_triangle_mesh("mesh.obj", mesh) # Gives the warning "[Open3D WARNING] Write OBJ can not include triangle normals.", but still writes the file.

mesh.triangle_normals = o3d.utility.Vector3dVector([])
o3d.io.write_triangle_mesh("mesh.obj", mesh) # Writes the file without any warnings.

Same issue here. The above response is relevant only when creating an obj with no normal. What about when the normals are needed in the obj ?

tlemarec avatar Jun 24 '21 16:06 tlemarec

Writing Triangle Normal is currently not supported in WriteTriangleMesh for OBJ format. mesh.triangle_normals = o3d.utility.Vector3dVector([]) -> This removes the normals, that's why we don't get the warning.

I have added this to feature_request. Thanks

reyanshsolis avatar Dec 01 '21 14:12 reyanshsolis

WriteTriangleMesh

Hi, @reyanshsolis, did you solve this problem? I also want to save normals value into the obj file, but it failed. the version of my open3d is 0.15.1.

jackieyung avatar Dec 22 '22 02:12 jackieyung

I'm facing same issue. Just checking to see if there are any updates.

josephko91 avatar Sep 01 '23 14:09 josephko91

Same here, I think this is an essenial attr.

StarsTesla avatar Jan 23 '24 02:01 StarsTesla