kaolin icon indicating copy to clipboard operation
kaolin copied to clipboard

OBJ import doesn't read edge information.

Open annada-behera opened this issue 4 years ago • 1 comments

Here is the OBJ file content for a cube, cube.obj

# Blender v2.93.0 OBJ File: ''
# www.blender.org
mtllib cube.mtl
o Cube
v 1.000000 -1.000000 1.000000
v 1.000000 -1.000000 -1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 1.000000
v 1.000000 1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
l 6 8
l 2 6
l 1 2
l 8 7
l 3 4
l 5 6
l 3 7
l 1 3
l 8 4
l 7 5
l 5 1
l 4 2

And when I import it, c=kaolin.io.obj.import_mesh('./cube.obj'); print(c);, I get this:

return_type(vertices=tensor([[ 1., -1.,  1.],
        [ 1., -1., -1.],
        [-1., -1.,  1.],
        [-1., -1., -1.],
        [ 1.,  1.,  1.],
        [ 1.,  1., -1.],
        [-1.,  1.,  1.],
        [-1.,  1., -1.]]), faces=tensor([], dtype=torch.int64), uvs=None, face_uvs_idx=None, materials=None, materials_order=None, vertex_normals=None, face_normals=None)

All the lines starting with l n m have been ignored?!

I had created the cube in Blender, deleted all the faces and exported it.

annada-behera avatar Sep 13 '21 09:09 annada-behera

Hi @annada-behera ,

We currently don't support line element from obj can you tell us more about the use case? What kind of output would you expect by reading this file?

Caenorst avatar Sep 23 '21 18:09 Caenorst

Closing for inactivity

Caenorst avatar Dec 12 '22 23:12 Caenorst