vtkLabeledDataMapper => all texts disappearing issue

Hi friends,

I’m using a vtkLabeledDataMapper to display multiple strings at 3D positions.
Mapper is filled in with a vtkPolyData containing points (for positions) and data arrays (one for strings and one for types = text properties).

Works great, except that if the very last point of the PolyData goes out of the viewport (user pans the camera), then the whole Actor disappears (all texts become invisible).

Initial scene => 4 texts visibles
The upper-left-most text is the last text of the Mapper / PolyData.

After a Left PAN of the camera => 4 texts are still visible

After a small additional Left PAN => texts hidden

Same thing but with another text out of viewport => no issue

Any idea ?
Thanks !

Hello,

it is very likely that this just an error in the implementation of the mapper. I’ve opened an issue here : https://gitlab.kitware.com/vtk/vtk/-/issues/18773 .

Feel free to add minimal self-contained steps to reproduce in the issue, that would help a lot whoever wants to solve this :slightly_smiling_face:

Thanks Timothee !

Timothee,

I’ve dug a little into vtkLabeledDataMapper’s code, and can’t see an obvious element that could explain the above behavior.
I guess the problem comes from a more general treatment in the rendering pipe, something that thinks the Mapper is out of sight, and discard it totally.

I’ve searched for it in VTK source (Actor2D, Mapper, etc …) but it’s not that easy.
Do you have any idea Timothee that could narrow down my search ?

Indeed, maybe the problem isn’t related to vtkLabeledDataMapper at all. I tried using the example here https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabeledDataMapper/ but couldn’t reproduce your issue. Sadly I don’t have any ideas that could explain the behavior you’re observing.

“Sample” not showing the issue is very interesting, I’ll go that way by searching for differences with my own code.
Tks Timothee !

Issue spotted inside my VTK wrapper …
Very sorry for this “false positive”, and thanks again Timothee for your time/tests.

No worries, glad that you found your issue :slightly_smiling_face: do not hesitate to tag your message as the solution to close this thread