[Interest] Qt3D - QObjectPicker & back-face culled entities

Andy asmaloney at gmail.com
Wed Dec 7 17:11:42 CET 2016


On Wed, Dec 7, 2016 at 8:14 AM, Sean Harmer <sean.harmer at kdab.com> wrote:

> On Wednesday 07 December 2016 13:03:26 Philip Schuchardt wrote:
> > It doesn't appear to be supported in the current documentation (5.7).
> > Another way to solve this is by rendering each object with a unique
> picking
> > color and the querying the pixel color under the mouse.  This could
> > probably be done by setting up a framegraph and use a RenderCapture
> > (although, I haven't gotten a RenderCapture to work).  With this
> > method, back-face culled entities will be handled correctly. One downside
> > to this method is that you'll only be able to query the closest pixel. I
> > guess you could do something like depth peeling to get other pixels, but
> > seem a bit extreme. With the pixel-based approach, you can improve
> > performance by reducing the size of the viewport. Reducing the size
> trades
> > off accuracy for performance by the way. For example squishing a 1000 x
> > 1000 pixel viewport into 10 x 10 pixel viewport would give you good
> raster
> > performance but your picking wouldn't be very accurate.
> >
> > Perhaps adding a flag to QPickerSetting to support back-face culling
> would
> > be a nice feature. Have you looked in Qt bug tracker?
>
> That's coming in 5.8. Just need to check it's working as expected...
>

Thanks guys!

Sean - that's great.  Seems like it would be a common use-case.

It leads back to my original question though - how to I get to
QPickerSettings from my Qt3DWindow-derived class? (Or will that be part of
the changes as well?)


> > Also, is the triangle picking is accelerated in any way? Or does the
> > algorithm just brute force through all the triangles?
>
> Does a broad phase check on bounding spheres first. Then traverses
> triangles.
>
> Cheers,
>
> Sean
>
> >
> > On Wed, Dec 7, 2016 at 12:41 AM Andy <asmaloney at gmail.com> wrote:
> > > (Since I didn't get any response from my last question about picking I
> > > thought I'd try asking it in a different way.)
> > >
> > > How do I prevent the object picking mechanism from "seeing" back-face
> > > culled entities so that it picks entities based on what the user is
> > > actually seeing in the scene?
> > >
> > > Thank you!
> > >
> > > ---
> > > Andy Maloney  //  https://asmaloney.com
> > > twitter ~ @asmaloney <https://twitter.com/asmaloney>
> > >
> > > _______________________________________________
> > > Interest mailing list
> > > Interest at qt-project.org
> > > http://lists.qt-project.org/mailman/listinfo/interest
>
> --
> Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161207/c1840234/attachment.html>


More information about the Interest mailing list