today I am trying to implement name plates for each mesh in my scene. These nameplates shall appear, if i click on a mesh (maybe leftclick) and disappear, if I click it again (maybe rightclick).
I already looked in some other threads here and found some infos about using GUI features to achieve this. In general I can implement the nameplates through GUI features, but this gives me huge performance issues due to the big amount of meshes I have in my scene.
So, do you have other suggestions how to do it?
Some more information, that might be helpfull: The shape, position, color and textures of my meshes are all set through a JSON file, that is created in a certain software.
Using dynamictextures does apparently not do the trick, because if I use these, I loose the actual color and texture.
I also tried to add a simple plate in front of each mesh during creation, but that kinda breaks it.
Can you create the plate when the user clicks the mesh?
Also, to maintain performance, you can keep a list of created plates and dispose the oldest when an arbitrary number of plates is reached.
You should not get a performance drop with 4-5 plates. Sorry to insist but if you could copy/paste your code in a PG that would help me debug your issue.
sry for not replying in a while. I had to do other stuff. But now I am back for this projekt
Recently I thought about using the Bounding box of a Mesh to display the name of the mesh.
Any ideas if that is possible? Adding some text on one side of the cube should do the trick, but I dont know, if thats possible …
At the same time I am trying to use a GUI Button as a nameplate. Leftclick on a mesh, the button should appear and rightlick on a mesh, the button should disappear.
The creation of the button works, but I dont know how to delete it.
How many name plates at one time? I have seen your stress test with 1000 actors. Is that the goal?
Couple of thoughts:
I am guessing you cannot fit all plate textures into one atlas.
If it is only names, use letter meshes (max 26 draw calls)
Alphabet texture atlas and subdivided plates (more verts but 1 draw call)
I am wondering though, realistically, how many name plates in one screen make sense? Ignoring overlapping and hence illegible plates, but does the player need to know always all names? Can you limit it to party-members only? Other names on hover? In other words display rules to manage draw calls.
It was more for curiosity to know what was possible to do to improve. But you’re right, it’s a little overkill, and there is other ways to control the DC