pcl icon indicating copy to clipboard operation
pcl copied to clipboard

PCLVisualizer cannot display TextureMesh

Open LeeXujie opened this issue 1 year ago • 5 comments

图片

When I use pcl::visualization::PCLVisualizer to addTextureMesh, it will report the error above and only display a PolygonMesh on visualizer as bellow.

图片

LeeXujie avatar Aug 05 '24 01:08 LeeXujie

Oh, my system is ubuntu 20.04 and pcl version is 1.10

LeeXujie avatar Aug 05 '24 01:08 LeeXujie

@LeeXujie Can you upload the TextureMesh you used as a .obj file?

mvieth avatar Aug 05 '24 07:08 mvieth

@mvieth > @LeeXujie Can you upload the TextureMesh you used as a .obj file?

I use this project and add some codes at the end of texture_mapping.cpp for visualization, as shown in the following figure. You can clone this project, build and run texture_mapping, it can generate TextureMesh and output an .obj file, thanks!

图片

LeeXujie avatar Aug 05 '24 08:08 LeeXujie

@LeeXujie As far as I was able to find out, addTextureMesh uses a VTK method (MapDataArrayToMultiTextureAttribute) that is only properly implemented in VTK 8.2.0 and newer (see https://gitlab.kitware.com/vtk/vtk/-/commit/bbc96ed3bb95dde45f5fd4e7f932929fe5c667bd ). So if you want to use addTextureMesh, the only recommendation I can give you is to use VTK 9 and PCL 1.12.1.

mvieth avatar Aug 05 '24 14:08 mvieth

@mvieth Okay, I'll think of other ways. Thank you for your reply.

LeeXujie avatar Aug 06 '24 01:08 LeeXujie