Re: [Bf-committers] Occlusion Query based selection

2012-03-29 Thread Antony Riakiotakis
Hi Mike, the bad news are that I still don't know the depth of all objects (I 'could' find out with a glreadpixels but it may inroduce some latency. And it will only be practical for one object only.) But this is a workaround in the sense that by differentiating between different selection requirem

Re: [Bf-committers] Occlusion Query based selection

2012-03-29 Thread Mike Erwin
Hey Antony, I'm glad you're working on this, because fast selection is required for better 3D mouse interaction. Not selection in the "user clicked something" sense, but I need to know what objects are shown in a certain part of the view, and how far away they are. I've done experiments with depth

Re: [Bf-committers] Occlusion Query based selection

2012-03-29 Thread Antony Riakiotakis
On second thought, I think that depth effects won't be affected because we already redraw the scene to get selection highlight. ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers

Re: [Bf-committers] Occlusion Query based selection

2012-03-29 Thread Antony Riakiotakis
Time to resurrect this little thread. Here is a patch that uses a draw twice method to select the first possible object. First I draw a small part of the framebuffer with depth test less or equal and on the second pass, where I have the depth information, I use an equal test. I differentiate betwe

Re: [Bf-committers] Occlusion Query based selection

2011-12-06 Thread Αντώνης Ρυακιωτάκης
Color drawing still doesn't solve depth though. I think I will go for the draw twice method and ask for tests by the people concerned. ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers

Re: [Bf-committers] Occlusion Query based selection

2011-12-06 Thread Brecht Van Lommel
The implementation looks good, nice & simple API. Depth is indeed an issue, not only for the manipulator.. Drawing twice is not great but may be acceptable, I don't have other suggestions to solve this, except maybe color code drawing to an offscreen buffer. Brecht. 2011/12/6 Αντώνης Ρυακιωτάκης

Re: [Bf-committers] Occlusion Query based selection

2011-12-06 Thread Αντώνης Ρυακιωτάκης
There is an extra method: draw scene in framebuffer twice with depth test enabled and draw a second time with depth test equal. This will be slower but nowhere near the 30 second selection lag reported by some users. ___ Bf-committers mailing list Bf-comm

Re: [Bf-committers] Occlusion Query based selection

2011-12-06 Thread Αντώνης Ρυακιωτάκης
Final patch. Made an interface for both methods (glRenderMode(GL_SELECT) and glBeginQueryARB(GL_SAMPLES_PASSED) ) http://www.pasteall.org/27077/diff build on graphicall: graphicall.org/747/ considerations: We can't have depth information with this method, meaning that the first visible object do

Re: [Bf-committers] Occlusion Query based selection

2011-12-03 Thread Αντώνης Ρυακιωτάκης
Hi brecht, quickie answer and update for builders\testers(forgot to include some fill rate optimization in the first patch posted here): use the patch here http://www.pasteall.org/26958/diff instead. About interference: the updated patch above turns off writing to the color buffer (since it doesn'

Re: [Bf-committers] Occlusion Query based selection

2011-12-03 Thread Brecht Van Lommel
Hi, Yes, it would be good to avoid GL_SELECT when possible. Making a common interface that can use a different method depending on the graphics card support seems the way to go. Regarding occlusion queries, is there any way around counting the number of queries needed in advance? It seems like th

[Bf-committers] Occlusion Query based selection

2011-12-03 Thread Αντώνης Ρυακιωτάκης
Hi, recently I have become aware of a user complaint http://blenderartists.org/forum/showthread.php?238426-why-is-gl_select-still-used-to-select-objects-in-Blender about slow selection. This is not a new issue and stems from the fact that selection uses glRenderMode(GL_SELECT) under the hood. Th