Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying billboarded text #29

Open
GearsAD opened this issue May 6, 2018 · 4 comments
Open

Displaying billboarded text #29

GearsAD opened this issue May 6, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@GearsAD
Copy link

GearsAD commented May 6, 2018

Any chance for supporting billboarded text (2D text that always faces the camera)?

Great library by the way! Similar to Drake without all the deps, nice.

@rdeits
Copy link
Owner

rdeits commented May 6, 2018

Yeah, I agree that would be nice. It's not currently supported in the underlying meshcat javascript library, though, so there'd have to be some work done. I can see a couple of options:

  1. Add an set_text() (or perhaps just set_html()) command to the meshcat javascript library and then bind that method from julia
  2. Just compose the text you want with the meshcat window directly using WebIO.jl.

The second option likely requires fewer changes (once #28 comes in), but might be less flexible.

Can you tell me more about what you'd want to do with billboarded text?

@GearsAD
Copy link
Author

GearsAD commented May 6, 2018

Sure, I'm not sure about the differences between the two options, but I think it's between rendering in the 3D world or on a separate canvas? Ideally the text would exist in the 3D world (not an overlaid canvas), so that we don't have to worry about culling etc. I'd like to annotate objects in the 3D world, show their names and some brief information that would always face the camera.

My PoC: https://github.com/GearsAD/SynchronySDK.jl/blob/MeshCat_PoC/examples/MeshCat_VisPoC.jl

In this scenario I'd like to draw the node label+ID and details.

I see there's a lot of talk about this at threejs :mrdoob/three.js#1321, but not sure if it ended in consensus (I'm new to three.js).

@rdeits
Copy link
Owner

rdeits commented May 7, 2018

Ah, ok. Yes, if you want the text to live in the 3D world (but be rendered facing the camera), then that's definitely option (1). I'm not sure how to do that in threejs either, but I think the link you posted is the right place to start.

@ThatcherC
Copy link

Any chance adding some sort of text display will be easier now that #28 is merged? I'd love to be able to add some text tags to parts of my scenes but haven't found a good way to do it yet.

@ferrolho ferrolho added the enhancement New feature or request label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants