I’m trying draw some atoms (spheres) with their element symbol as a label on top of them. As the camera pivots the label should always remain on top of the atom, but be behind any other atoms that are in front, and the label should shrink the further away it gets (to match the atom).
My current solution is to create a plane and assign a TextBlock to it’s texture with .addControl, then move the plane as the mesh moves and face it towards the camera, so that it’s always sitting just in front of the atom. This gives the label the correct depth and tracking. It works for the most part, but runs into issues when atoms are close to eachother and at the edge of the screen, and the text overlaps the atom in weird ways since it’s a flat plane sitting in front of a round edge.
Is it possible to somehow attach the label to the sphere rendering, so that it always renders over top of the parent atom, but will be behind any other atoms which overlap it?
Thanks for any suggestions!