[vtkusers] vtkOBJReader not reading the whole mesh

Tony Yuan tonyuanac at gmail.com
Wed Dec 13 11:40:25 EST 2017


Hi,

I have a problem reading Blender OBJ files using VTK. The vtkOBJReader seems to only read part of the mesh. When I render the data being read it looks like this:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk.png
Type: image/png
Size: 18480 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171213/6d1fa6b6/attachment-0002.png>
-------------- next part --------------


However, when I import the OBJ file in Meshlab it looks fine. Mac?s Preview is also able to open the complete mesh.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: meshlab.png
Type: image/png
Size: 34904 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171213/6d1fa6b6/attachment-0003.png>
-------------- next part --------------


I attached the OBJ file and my code below. I am not very familiar with the OBJ format and how vtkOBJReader is implemented. If someone could point me to the problem and possible fixes, that would be great.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: model.obj
Type: application/octet-stream
Size: 628701 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171213/6d1fa6b6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadObj.cpp
Type: application/octet-stream
Size: 1419 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171213/6d1fa6b6/attachment-0003.obj>
-------------- next part --------------


Thanks,
Tony



More information about the vtkusers mailing list