[Bf-committers] GL_SELECT

Antony Riakiotakis kalast at gmail.com
Sun Jul 28 12:40:16 CEST 2013

On 28 July 2013 10:01, Jason Wilkins <jason.a.wilkins at gmail.com> wrote:

> Psy-Fi did an implementation of Occlusion query picking.  I'd like to know
> why that wasn't followed up on.
Nothing really, the code is rotting peacefully here
https://github.com/Psy-Fi/psy-fi_blender/tree/occlusion-selection and it's
been a while since I rebased the branch to trunk.

As far as I remember the consensus was that ray picking would be
advantageous because it would allow tools to be decoupled from drawing
code. Also I'm not sure if OpenGL ES supports occlusion queries, if not it
might be problematic later on.

There is really one issues with ray picking in my mind, which is that for
big scenes it would require tremendous processing for pixel exactness,
unless a hierarchical scheme is used. If some bvh scheme is used then
possibly these could take quite less with the disadvantage of increased
memory footprint. However such queries could even be threaded, making this
more effective.

In any case, the occlusion code does work but requires two passes for a
first hit collision to do depth peeling. Since display is usually fast this
is OK for most cases. I haven't tested it at all with the offscreen buffer
selection that blender uses now but I hope it should work.

More information about the Bf-committers mailing list