Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, August 02, 2011 4:49 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. Most (all?) cards today do break them into 2 tris, but nothing in the OpenGL spec says that they have to, or specifies exactly how they should do it. The reason is that the original SGI geometry engine did not split them. It drew quads directly with an odd algorithm for interpolating values across the interior. Quad lives on as a historical quirk, like the panda's thumb. -Mike Garrity -The MathWorks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
The odd algorithm you're referring to is bilinear interpolation which essentially defines a hyperbolic paraboloid (the simplest surface) through 4 non-coplanar points (i.e. the infamous quad). For intersection purposes in OSG, it's good that it breaks the quad up into two triangles. Planes are easier to intersect than bilinear surfaces... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mike Garrity Sent: Thursday, August 04, 2011 8:24 AM To: OpenSceneGraph Users Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, August 02, 2011 4:49 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. Most (all?) cards today do break them into 2 tris, but nothing in the OpenGL spec says that they have to, or specifies exactly how they should do it. The reason is that the original SGI geometry engine did not split them. It drew quads directly with an odd algorithm for interpolating values across the interior. Quad lives on as a historical quirk, like the panda's thumb. -Mike Garrity -The MathWorks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. As for how OSG handles quads relative to intersections, it is my understanding that the intersector works with line/triangle intersections. If you're trying to intersect a quad, however, it would seem that if either of the two triangles is hit, 4 vertexes would/should be returned. I haven't looked at the code to really know for sure. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, August 02, 2011 1:14 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned Hi S2LR, I thought QUAD is a OpenGL primitive. Your statement make sence to me. But then OSG hides the substitution by 2 triangles quite good, also in the wiremode of osgViewer the quads are displayed. I thought (even when not to often used as triangles) that quads are natively supported and would work with intersections. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41804#41804 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
On 8/2/2011 2:49 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. As for how OSG handles quads relative to intersections, it is my understanding that the intersector works with line/triangle intersections. If you're trying to intersect a quad, however, it would seem that if either of the two triangles is hit, 4 vertexes would/should be returned. I haven't looked at the code to really know for sure. OSG's intersection code decomposes QUADs into triangles. Your result should be interpreted as triangles, created in pairs from the original QUADs. -Shayne -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org