[osg-users] New to OSG, some questions (selection buffer, parametric curves)

2008-02-11 Thread Raphael Sebbe
Hi everyone,
I am new to OSG, yet intend to use it for some projects. I've been through
implementing some scene graph things before, I find OSG very interesting, I
appreciate tight OpenGL integration (no cumbersome abstractions) and clean
class design. So far I have a few questions regarding some aspects of OSG:

- OpenGL selection buffer seems not recommended as a way of picking in OSG,
explicit primitive intersections are used instead. Could someone please
comment on this (why...)?
- Support for parametric curves / surfaces (Bezier, NURBs and the likes).
Are there any plan to support this directly (through GLU or other), or
should I export those as polygonal data instead?

Thank you very much,

Raphael
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New to OSG, some questions (selection buffer, parametric curves)

2008-02-11 Thread Jean-Sébastien Guay
Hello Raphael,

Welcome! Hope you enjoy your time working with OSG, and the community 
around it!

 - OpenGL selection buffer seems not recommended as a way of picking in 
 OSG, explicit primitive intersections are used instead. Could someone 
 please comment on this (why...)?

I'll let others answer this one, I don't know myself. I have always 
found OpenGL selection buffers cumbersome to use, but with a good 
wrapper it should be possible to make something that works well and is 
easy to use I imagine. So I don't know why that was not done.

 - Support for parametric curves / surfaces (Bezier, NURBs and the 
 likes). Are there any plan to support this directly (through GLU or 
 other), or should I export those as polygonal data instead?

I would like to eventually help in adding support for parametric curves 
and surfaces in OSG. I have used the GLU interface before and would have 
used that as the first step, followed by an implementation using 
Geometry Shaders, with the ability to select the implementation you want 
to use at runtime and a fallback mechanism. I think it would be really 
cool to support that. But I haven't gotten to it thus far... :-(

If you want to start doing something in this direction, I will be glad 
to test and comment. And search the archives, there was a discussion 
related to this not too long ago, so there was obviously interest in this.

Hope that helps, and again welcome.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New to OSG, some questions (selection buffer, parametric curves)

2008-02-11 Thread Paul Martz
- OpenGL selection buffer seems not recommended as a way of picking in OSG,
explicit primitive intersections are used instead. Could someone please
comment on this (why...)?

OpenGL's selection render mode is almost universally implemented via
software rendering, and is therefore painfully slow for any moderate
geometry load. It also tends to be O(n) -- your app just renders everything,
even stuff no where near the pick point. You can sidestep these issues by
reducing or simplifying the geometry being tested.
 
Selection is the only (sort of direct) support OpenGL has for picking, so if
you're using OpenGL and don't want to code a better method, then you're
stuck with selection.
 
Fortunately OSG has a superior alternative. One thing scene graphs are good
at is spatial organization. As a result, pick testing in a scene graph is
O(log(n)). Although it also runs in software, it performs simple ray/sphere
intersection tests, which are much more efficient than software
rasterization.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
303 859 9466
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New to OSG, some questions (selection buffer, parametric curves)

2008-02-11 Thread Raphael Sebbe
Hi J-S,

Yes, geometry shaders would be a must for these (and also for subdivision
surfaces). I'd be interested in contributing to these (time permitting, you
know that...), although I first have to catch up with OSG.
Thank you!

Raphael

On Feb 11, 2008 10:29 PM, Jean-Sébastien Guay 
[EMAIL PROTECTED] wrote:

 Hello Raphael,

 Welcome! Hope you enjoy your time working with OSG, and the community
 around it!

  - OpenGL selection buffer seems not recommended as a way of picking in
  OSG, explicit primitive intersections are used instead. Could someone
  please comment on this (why...)?

 I'll let others answer this one, I don't know myself. I have always
 found OpenGL selection buffers cumbersome to use, but with a good
 wrapper it should be possible to make something that works well and is
 easy to use I imagine. So I don't know why that was not done.

  - Support for parametric curves / surfaces (Bezier, NURBs and the
  likes). Are there any plan to support this directly (through GLU or
  other), or should I export those as polygonal data instead?

 I would like to eventually help in adding support for parametric curves
 and surfaces in OSG. I have used the GLU interface before and would have
 used that as the first step, followed by an implementation using
 Geometry Shaders, with the ability to select the implementation you want
 to use at runtime and a fallback mechanism. I think it would be really
 cool to support that. But I haven't gotten to it thus far... :-(

 If you want to start doing something in this direction, I will be glad
 to test and comment. And search the archives, there was a discussion
 related to this not too long ago, so there was obviously interest in this.

 Hope that helps, and again welcome.

 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New to OSG, some questions (selection buffer, parametric curves)

2008-02-11 Thread Raphael Sebbe
I didn't know software rasterizer was used... hmm, but thinking about it, it
makes sense as retrieving info from the GPU has not always been an easy
thing, yet selection buffer exists since a very long time. Anyway, as you
said, higher level knowledge of the scene is definitely an advantage.
I'll try to reproduce the same configuration (selecting a square of given
width around the click in view space, think I saw a pyramid-like
intersection primitive for doing this in OSG) as I did before with selection
buffer.

Thanks for that info,

Raphael

On Feb 12, 2008 2:52 AM, Paul Martz [EMAIL PROTECTED] wrote:

  - OpenGL selection buffer seems not recommended as a way of picking in
 OSG, explicit primitive intersections are used instead. Could someone please
 comment on this (why...)?

 OpenGL's selection render mode is almost universally implemented via
 software rendering, and is therefore painfully slow for any moderate
 geometry load. It also tends to be O(n) -- your app just renders everything,
 even stuff no where near the pick point. You can sidestep these issues by
 reducing or simplifying the geometry being tested.

 Selection is the only (sort of direct) support OpenGL has for picking, so
 if you're using OpenGL and don't want to code a better method, then you're
 stuck with selection.

 Fortunately OSG has a superior alternative. One thing scene graphs are
 good at is spatial organization. As a result, pick testing in a scene graph
 is O(log(n)). Although it also runs in software, it performs simple
 ray/sphere intersection tests, which are much more efficient than software
 rasterization.

  Paul Martz
 *Skew Matrix Software LLC*
 http://www.skew-matrix.com
 303 859 9466

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org