Is there any way to place text labels by my 3D objects in my universe?
Does Xith3d provide any utils for this?
Thanks
Zak
Is there any way to place text labels by my 3D objects in my universe?
Does Xith3d provide any utils for this?
Thanks
Zak
I don’t know if that what I was looking for.
I am needing to place text labels as a part of naming things in my 3D universe, that would move along with the object as it is being updated.
In java3D, there was a RasterTextLabel class that did the type of functionality I needed. Also, if you look at the application called Freefall (on mac) the labels shown following the satellites is what I am trying to reproduce.
Thanks
Zak ???
I think there isn’t actually something that has this kind of function, but you could try to do it with textured transparent faces
So, Xith3D has no support for bitmapped fonts?
Can you reference me to a tutorial about textured transparent faces?
Thanks
Zak
I need to implement this is my game as well. I haven’t attempted it yet but I was planning on using the Text2D class in the toolkit. Take a look at that and let me know if it works for you:
https://xith-tk.dev.java.net/servlets/ProjectDocumentList
I looked at the Text2D class, It generates a textured quad with the text text in it.
The biggest of the work is done !
One way can be to create a BufferedImage and draw Text into it via Java’s AWT GraphicsContext and then make a texture out of it. This should work for static text labels (e.g. no changing text or animation).
Anotherway is to create an empty texture of and getting the ImageComponent from it. Then you can use again the Graphics Context to draw right into the texture. I think you need to set the textures dirty flag to enable updating.
Problems associated with this approach: