polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

3d label supporting???

Open JianqiangDing opened this issue 3 years ago • 4 comments

Hi, does the polyscope supports 3d text label visualization? e.g. add a label for each vertex of some testing mesh, it's really useful for debugging and testing.

JianqiangDing avatar Mar 10 '21 08:03 JianqiangDing

No, it doesn't support it. But it's a great idea! Let's put it on the to-do list.

nmwsharp avatar Mar 16 '21 20:03 nmwsharp

Hey! Was this ever incorporated?

rahul-mitra13 avatar Jun 14 '23 15:06 rahul-mitra13

Nope, still not implemented. But still a great idea :)

I looked into it briefly: the main challenge is figuring out how to do the text rendering.

The most obvious choice would probably be to use ImGUI, which has some low-level methods we can use to draw text at arbitrary points on screen. However, this might require some awkward gymnastics in Polyscope, because right now the ImGUI rendering happens at a separate render phase than the scene rendering, and also there is no way to integrate with other parts of the scene renderer like occlusions and transparency should we want to.

The other possibility is to implement some simple texture-based text rendering functionality into Polyscope's scene renderer. This is probably a better solution long-term, but requires some more serious engineering. I'm not sure if there is some simple / general / permissively-licensed text render we can incorporate, or if we'd really want to implement it from scratch.

nmwsharp avatar Jun 14 '23 18:06 nmwsharp

Gotcha, appreciate the detailed response. :)

rahul-mitra13 avatar Jun 15 '23 14:06 rahul-mitra13