In my scene I have spheres and for each spheres I want to display their labels near them.
TGLFlatText don't convince me because it is in 3D so I am using TGLHudText which is in 2D.
My problem is that TGLHudText don't move when I move camera. In order to fix that, in each camera moves, I destroy then create new TGLHudText. The result is good but not really optimised when I have a lot of spheres (500).
Is there any proper method to move TGLHudText when I moved the scene.
hello for what you want to do you must use TGLFlatText create it as a child of your sphere and set options to twosidelighting and set depthtest to false (no z write) see GLGizmoEx units and demo TGLFlattext work well
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried your method, it works but this is not the result I want: I always want labels in front of me whatever the camera position. I don't want "mirror" labels for users.
Is there something I can do with TGLFlatText to do that ?
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In this project, I had 2 labels (1 TGLFlatText and 1 TGLHUDText) on each spheres. I show one of these labels with the checkbox.
TGLFlatText:
OK: this item moves automatically when camera turns and when zoom in/out.
KO: mirror label according to camera position. Is there a way to have visible not mirrored TGLFlatText whatever camera position ?
TGLHudText
OK: this item moves when camera turns but I have to implement the new position on each moves.
KO: zoom in/out. TGLHudText don't "follow" the sphere
Regarding to this project, I don't know if I had better to use TGLFlatText or TGLHudText.
Hello,
In my scene I have spheres and for each spheres I want to display their labels near them.
TGLFlatText don't convince me because it is in 3D so I am using TGLHudText which is in 2D.
My problem is that TGLHudText don't move when I move camera. In order to fix that, in each camera moves, I destroy then create new TGLHudText. The result is good but not really optimised when I have a lot of spheres (500).
Is there any proper method to move TGLHudText when I moved the scene.
Attached, here is an example of my issue.
Thanks
Delphi Berlin Upd1 and GLScene 1.4.1.
Last edit: LefjuCabro 2016-11-08
hello for what you want to do you must use TGLFlatText create it as a child of your sphere and set options to twosidelighting and set depthtest to false (no z write) see GLGizmoEx units and demo TGLFlattext work well
Hello,
I tried your method, it works but this is not the result I want: I always want labels in front of me whatever the camera position. I don't want "mirror" labels for users.
Is there something I can do with TGLFlatText to do that ?
Regards
Hi can you post a sample source and some screenshots, please. I'll can get in touch when i'll have a little time.
Hi here is an example in "Labels.7z".
In this project, I had 2 labels (1 TGLFlatText and 1 TGLHUDText) on each spheres. I show one of these labels with the checkbox.
TGLFlatText:
OK: this item moves automatically when camera turns and when zoom in/out.
KO: mirror label according to camera position. Is there a way to have visible not mirrored TGLFlatText whatever camera position ?
TGLHudText
OK: this item moves when camera turns but I have to implement the new position on each moves.
KO: zoom in/out. TGLHudText don't "follow" the sphere
Regarding to this project, I don't know if I had better to use TGLFlatText or TGLHudText.
You need update HUDText's position under GLSceneViewerMouseWheel
Quite simply... Thanks
RESOLVED
Last edit: LefjuCabro 2016-11-18