Let me be more precise about the question of my last post: in a 3D scene, I would like to create some sort of panel of the road on which I want to display a text; the text can changed by code.
My firt thought was to use a Node with two children: a Text3D and a Box.
nymon tells me it is possible to display a text on a texture and then use it.
But I can't find any example about this
I would appreciate any assistance!
Hey I tried looking around in the code and you may have been on the right track with the Text3D. ://
Looking at Test3DFlatText it seems you could easily place it in your scene without worrying about using textures and such.
Also dug up this, in case this is more what you’re going for: TextLabel
It might be not the fastest solution, but you can always draw in a BufferedImage and convert it to a texture. I did this e.g. for HUD elements.
In fact, TextLabel is a Quad and has a method that returns a BufferedImage and applies it to the Quad as a texture.
Using TextLabel code source, I was able to have a transparent background (the BufferedImage in fact).
What I try to achieve now, is to have a translucent Quad with an opaque text in white; so I tried an AlphaState applied to the Quad, but without success.
I ask me if it's even possible?
I can achieve that with two quad, but with one quad I don't know.