accurate object picking

What it says on the tin: a place to discuss proposed new features.
Post Reply
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

accurate object picking

Post by mickeyren » Fri Jan 09, 2009 10:40 am

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.
0 x

User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany

Re: accurate object picking

Post by xadhoom » Fri Jan 09, 2009 3:01 pm

0 x

mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: accurate object picking

Post by mickeyren » Wed Jan 21, 2009 7:16 am

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.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: accurate object picking

Post by jacmoe » Wed Jan 21, 2009 7:21 am

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.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Re: accurate object picking

Post by KungFooMasta » Wed Jan 21, 2009 5:51 pm

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!

User avatar
sinbad
OGRE Retired Team Member
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

Post by sinbad » Wed Jan 21, 2009 6:06 pm

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.
0 x

Post Reply