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