vtkOBJReader in sample.cpp not reading the whole mesh
Closed this issue · 5 comments
Colin97 commented
Colin97 commented
mesh_sampling.cpp
wentaoyuan commented
Yes. There is a problem with vtkOBJReader while reading some ShapeNet models where parts of the model has tcoords/normals and other parts don't. I don't know if they have fixed that in the latest version. I solved this issue by adding the following code after line 956 in vtkOBJReader.cxx
and rebuild VTK.
// Here we turn off texturing and/or normals
if (n_tcoord_pts == 0)
{
hasTCoords = false;
}
if (n_normal_pts == 0)
{
hasNormals = false;
}
gillbam commented
Yes. There is a problem with vtkOBJReader while reading some ShapeNet models where parts of the model has tcoords/normals and other parts don't. I don't know if they have fixed that in the latest version. I solved this issue by adding the following code after line 956 in
vtkOBJReader.cxx
and rebuild VTK.// Here we turn off texturing and/or normals if (n_tcoord_pts == 0) { hasTCoords = false; } if (n_normal_pts == 0) { hasNormals = false; }
I'm using VTK 8.2.0, this code is useful, however, it shuld locate after line 858.
haomengz commented