I wish to implement a multiple selection of objects(mostly GLFreeForm) in the scene, as fa as I know GLScene doesn't have a EFFICIENT handling mechanism(other than GetPickedObjects, whcih is too slow) for multiple obejct selection, so what can be done in that regard.
Regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you Jerome for the entrypoint, this heavily relies on raycasting which sometimes may pose a culprits(slow selection is my main interest for the time being, I try to avoid it), isn't there a more openGL native way of doing this?
Googling reveals one of the techniques such as unique - color scheme. But interestingly reading from framebuffer with readpixels doesn't that fast at all, in which way do I really have to follow to overcome that?
REgards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Googling reveals one of the techniques such as unique - color scheme. But interestingly reading from framebuffer with readpixels doesn't that fast at all, in which way do I really have to follow to overcome that?
Have you some links to share ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
as you said there is no native solution to that solution AFAIK from the OpenGL architectural point of view, IMHO most reasonable solution seems to be to perfform the 1st pass, multiple object / selection rectangle frustum intersection, then after the 2nd pass look for the more sensitive selection filtering.
I'm willing to implement that but it will be very difficult task to surmount on, on my own without community help or guidance.
For example, to simply testify reading from framebuffer whether it will yield conceivable results or not. Shows that it is very slow, what am supposed to eliminate that ? Is there any more efficinet way of reading values from framebuffer.
for i:= 0 to SceneViewer.Height -1
begin
for j:= 0 to SceneViewer.Widht-1
begin
GL.glReadPixels(i,j,1,1, RGB, Unsigned_Byte, buffer );
end
end
Regards,
Last edit: SBlade 2017-08-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Blade thanks for yhe links i take a quick llok. Selecteing by FrameBuffer and with Once ColorID is not a bad idea butr not for multi-selecting.. The Best is what you described in 2 or perhaps 3 passes. I'll must take a loo to the boundingBoxes'functions and see if OOBB is implemented . I think is the "TAABBboundingBox" if i'm remember. but not sure i must take a look.
I have some questions regarding your project :
1 - How many maximlum objects do you want selecting ?
2 - Give me some clue on how you do to perform rendering and how you manage events (like mouse, keyboard..)
3 - What's your graphic Card ?
Pehraps we'll can optimize some things in your "common" code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) That really depends on the end user demend, but in any case user may want to select all objects in the scene ( say 1K-2K), so even in that case program should be able to handle that properly.
2) There is really nothing special about it, no fog, no textures etc.. at all. Mostly GLfreeform objects are on the scene, there is not special special handling for mouse or keyboard events as well. The most time consuming is snapping which iterates through vertices of objects in scene, but I can toggle that off before selection.
My humble demand is: selection must be fast, simply lit screen with smooth or flat shading is enough for me.
3) What a pity that I have AMD R7,
Regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All,
I wish to implement a multiple selection of objects(mostly GLFreeForm) in the scene, as fa as I know GLScene doesn't have a EFFICIENT handling mechanism(other than GetPickedObjects, whcih is too slow) for multiple obejct selection, so what can be done in that regard.
Regards,
Hi SBlade, check in GLZGimoEx.Pas
Last edit: Jerome.D (BeanzMaster) 2017-08-17
Thank you Jerome for the entrypoint, this heavily relies on raycasting which sometimes may pose a culprits(slow selection is my main interest for the time being, I try to avoid it), isn't there a more openGL native way of doing this?
Googling reveals one of the techniques such as unique - color scheme. But interestingly reading from framebuffer with readpixels doesn't that fast at all, in which way do I really have to follow to overcome that?
REgards,
No native way
Have you some links to share ?
Here they are,
http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-an-opengl-hack/
http://www.lighthouse3d.com/tutorials/opengl-selection-tutorial/
http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-custom-ray-obb-function/
http://www.unknownroad.com/rtfm/graphics/glselection.html
as you said there is no native solution to that solution AFAIK from the OpenGL architectural point of view, IMHO most reasonable solution seems to be to perfform the 1st pass, multiple object / selection rectangle frustum intersection, then after the 2nd pass look for the more sensitive selection filtering.
I'm willing to implement that but it will be very difficult task to surmount on, on my own without community help or guidance.
For example, to simply testify reading from framebuffer whether it will yield conceivable results or not. Shows that it is very slow, what am supposed to eliminate that ? Is there any more efficinet way of reading values from framebuffer.
Regards,
Last edit: SBlade 2017-08-19
Hi Blade thanks for yhe links i take a quick llok. Selecteing by FrameBuffer and with Once ColorID is not a bad idea butr not for multi-selecting.. The Best is what you described in 2 or perhaps 3 passes. I'll must take a loo to the boundingBoxes'functions and see if OOBB is implemented . I think is the "TAABBboundingBox" if i'm remember. but not sure i must take a look.
I have some questions regarding your project :
1 - How many maximlum objects do you want selecting ?
2 - Give me some clue on how you do to perform rendering and how you manage events (like mouse, keyboard..)
3 - What's your graphic Card ?
Pehraps we'll can optimize some things in your "common" code.
1) That really depends on the end user demend, but in any case user may want to select all objects in the scene ( say 1K-2K), so even in that case program should be able to handle that properly.
2) There is really nothing special about it, no fog, no textures etc.. at all. Mostly GLfreeform objects are on the scene, there is not special special handling for mouse or keyboard events as well. The most time consuming is snapping which iterates through vertices of objects in scene, but I can toggle that off before selection.
My humble demand is: selection must be fast, simply lit screen with smooth or flat shading is enough for me.
3) What a pity that I have AMD R7,
Regards,