PLY file colors not displayed

Are you sure this is not a data problem? Does meshlab display the obj with texture?

1 Like

The colors show up for the obj file on the mac’s built in viewer but it’s true they don’t show up in Slicer.

From looking at the file it appears the obj file has lines like:

v -18.0948 -12.9899 -14.4861 0.664791 0.228153 0.278322

which are presumably x, y, z, r, g, b.

But VTK’s importer doesn’t read this kind of data:

If this kind of obj file is common in the wild then it’s probably not hard to extend the VTK code to read them.

1 Like

I think it is fairly common to bake texture to vertices to avoid external texture files and the complications arise from it. Since VTK already supports PLYs with vertex colors, it is reasonable to support the OBJ as well.

Sure, I can see that it’s there in this real case. As the VTK comment says, OBJ format has many variants and they didn’t cover everything. Adding support for this variant would be a good project for someone who wants to do a little C++ project. It seems reasonable that the VTK maintainers would welcome the addition.

1 Like