BitmapText above all geometry

I am trying to add some features to the SkeletonDebugger by adding the option to display bone names. Everything is working except that the bone names are sometimes rendered behind the mesh’s geometry (for example if we are looking at the model from the left, the bones names on the right are not displayed.



I was wondering if there was a simple way of having BitmapText rendered above all geometry in the scene (I can’t parent it to the gui because the names must follow the movement of the mesh during animation).

Vector3f screenCoords = cam.getScreenCoordinates(somevector3f);



screenCoords.x and .y are the coordinates you want to use to position the bitmap text on the screen.



Note that “somevector3f” has to be world, not local.

2 Likes

actually if your text nodes are in the scene and not in the gui (like the skeleton debugger) the best way is to disable the depth test on the font material (that’s how the skeleton debugger does it)



font.getPage(index).getAdditionalRenderState().setDepthTest(false);



that’s an interesting improvement of the skeleton debugger, mind to contribute back when it’s done?

1 Like

Hi nehon, that’s exactly what I was looking for. And thank you madjack, although it didn’t solve the problem I was having, I think it might be of use when I try to fix the font size. Right now, it becomes small as I zoom out, and I need to make sure it renders the same size no matter where it is.



I will definitely contribute once it is done, although it might take a while since I am also going to try to add bone selection and other features. I’ll keep the community updated as I progress.

2 Likes

Yeah… In hindsight in I realize that’s not what you wanted. At first I thought you meant higher as in literally above, not the z order.

1 Like