Hi
Can we have an accurate object picking included in the scene manager? Right now we only have bounding box picking using the RaySceneQuery.
I hope it can be extended down to polygon level picking.
Thanks.
accurate object picking
- xadhoom
- Minaton
- Posts: 973
- Joined: Fri Dec 28, 2007 4:35 pm
- Location: Germany
Re: accurate object picking
This was discussed here: http://www.ogre3d.org/forums/viewtopic. ... 1&start=25
0 x
-
- Greenskin
- Posts: 142
- Joined: Thu Dec 18, 2008 11:32 am
Re: accurate object picking
Though i wish that this feature is included into Ogre - doesn't mean if Ogre is just a rendering engine this should not be included. Ultimately this is a very useful tool like what have been discussed here by gerds - http://www.ogre3d.org/forums/viewtopic.php?t=23440
There could be a class like RayCastUtilities or something that just does this. This wiki snippet here http://www.ogre3d.org/wiki/index.php/Ra ... ygon_level should just be officially included in the OGRE library, it doens't hurt to add one of this feature but it will save a lot of users spending time from customizing this wiki to fit their code.
I can't find any valid reason why this won't be included or not part of a design if it can be added as an extra utility function.
There could be a class like RayCastUtilities or something that just does this. This wiki snippet here http://www.ogre3d.org/wiki/index.php/Ra ... ygon_level should just be officially included in the OGRE library, it doens't hurt to add one of this feature but it will save a lot of users spending time from customizing this wiki to fit their code.
I can't find any valid reason why this won't be included or not part of a design if it can be added as an extra utility function.
0 x
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- Contact:
Re: accurate object picking
It is not going to be added, ever. 
It might seem innocent right now, but it will get out of hand.
Addon utilities are provided as addons. Mostly by the community.
Like the MOC.

It might seem innocent right now, but it will get out of hand.
Addon utilities are provided as addons. Mostly by the community.
Like the MOC.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- KungFooMasta
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- Contact:
Re: accurate object picking
As jacmoe pointed out, it does seem there is great resistance to growing the code base. In this aspect, I am very interested in watching the evolution of Ogre.
0 x
Creator of QuickGUI!
- sinbad
- OGRE Retired Team Member
- Posts: 19265
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 2
- Contact:
Re: accurate object picking
Efficient ray/triangle tests are best done with something like Opcode. There's really no point us duplicating this functionality, and there have been examples of using it in the past. MOC is nice for those that want something quick and dirty, but I really don't want to advocate that approach in the core.
And who says you always use ray picking anyway? In actual fact when I do per-pixel picking I often use a selection buffer (particularly for GUI tools) - ie a render target using special materials that colour-code objects, then I read a pixel colour back. However, I don't do this generically, it depends on the project - the colour codes may be assigned to groups of objects for example, or be associated with structures in the higher-level application rather than raw Renderable level, or certain objects will be tagged with a context which affects which ones will be visible in the selection buffer. I haven't come across a completely generic approach yet, so I use whichever one fits the project the best.
IMO there are already enough tools in the box to do this, and to pick an approach suitable for your project. Folding all of them into the core will just bloat the code more. Feel free to start an add-on project which wraps them all in a friendly (static) library though for those who want a shortcut.
And who says you always use ray picking anyway? In actual fact when I do per-pixel picking I often use a selection buffer (particularly for GUI tools) - ie a render target using special materials that colour-code objects, then I read a pixel colour back. However, I don't do this generically, it depends on the project - the colour codes may be assigned to groups of objects for example, or be associated with structures in the higher-level application rather than raw Renderable level, or certain objects will be tagged with a context which affects which ones will be visible in the selection buffer. I haven't come across a completely generic approach yet, so I use whichever one fits the project the best.
IMO there are already enough tools in the box to do this, and to pick an approach suitable for your project. Folding all of them into the core will just bloat the code more. Feel free to start an add-on project which wraps them all in a friendly (static) library though for those who want a shortcut.
0 x