election for Tesselated Objects

Objects rendered with gluTessVertex doesn’t respond to the selection operation implemented with “SelectionBuffer”. I have created the objects vertexes counter-clockwise and vice versa to see the effect whether I have made a mistake due to the sequential ordering, but either way performing clicking at the object doesn’t yield the selection. What could I have done wrong ? Using the ray-casting could be more efficient way ?

Best Regards,

sorry for the title “Selection for Tesselated Objects” :slight_smile:

Selection using ray intersections or OpenGL selection in complex environments requires some sort of bounding volume hierarchy to speed things up.

For OpenGL selection, you only want to render what could possibly intersect the thin beam of a pick frustum.

For ray intersections, you only want to test the ray against geometry somewhere near the ray.

For trivial scenes it doesn’t much matter, but if you have a lot of objects, especially if they’re made of many triangles, BV-trees can help enormously, with either method you choose.

hello plasmonster,
thnxs for the answer

I have to admit that posting the general perspective of problem and expecting the elaborated solution is a bit silly.

Actually I’m using GLScene package to create primitive object/s. I need to create “I Shaped” steel profile, there are couple of ways to do it in it (constructing primitives and nesting them hierarcially or descent a new object which implement its own paint algorithm)
but I choosed to create it with TGLExtrusionSolid (if you are familiar with ) where diving into to the source code reveals
that it’s implemented with “gluNewTess” tesselation method. For the object creation I use the 3 contours, in each one consist 4 set of nodes, first one defines the main body and other 2 contours defines extracting parts from main object. Althought, everything seems theoritically normal, trivial and supposed to select “I Shaped” profile on screen I couldn’t figure out why the object selection doesn’t work properly. Example code snippet or entry point will be appreciated.

Regards,

I’m not familiar with GLscene, but it sounds like you’re into some tessellation and some picking.

Here’s a good OpenGL picking tut:
http://www.lighthouse3d.com/opengl/picking/

And there are many other references, tutorials, and demos if you look through the menus at the top of the page. There’s a GLUT tessellation demo called tess.c in there somewhere as I recall.

Ray-geometry intersection techniques can be found in lots of places, like the Graphics Gems Books and source code, Real-Time Collision Detection, and Computational Geometry in C, just to name a select few books. Huge subject but I hope that helps.

Ah, found it! Tess.c and many other goodies:
http://www.opengl.org/resources/code/samples/redbook/