Re: [Virtools] 2D Picking and camera clipping planes

Subject: Re: [Virtools] 2D Picking and camera clipping planes
From: Klaus-Jürgen Quast <quast@xxxxxxxx>
Date: Thu, 12 Feb 2004 16:10:09 +0100
Thank you Patrick, in the meantime virtools provides some valuable support too. The problem of the 2D Picking BB is/was that it does not return objects which are placed inside other objects surrounding them but which get visible because near camera clipping "opens" the surrounding objects. If you pick such included visible objects the BB will return the surrounding object and not the one visible under the cursor. In this way the 2D Picking BB ignores camera clipping.

Thanks to Virtools, they delivered a patch for DEV 2.5/3.0 and announced that the correct behaviour will be availiable with player version 3.0 in the near future.

If one code a selfmade picking workaround using the Ray Intersection BB, you have to compute first the pick point on the near plane and then construct a ray starting from there.

Regards, Klaus

Patrick Hogenboom wrote:

For testing stuff under the cursor, the 2D Picking bb is probably the best choice.
It gives you a lot of info.
If that isn't enough, you can always go for a 2-step approach.
_2D Picking bb -> intersection point
_Ray Intersection bb, from camera pos in the direction of the intersection point
where direction = [intersection point] - [camera pos]


CU, Patrick

P.S. if you want to clip the to the camera planes, these bb's both return the distance.
If that's bigger than the far clip distance, you've hit beyond the far clip plane.





On Wed, 28 Jan 2004 15:02:20 +0100, Klaus-J|rgen Quast <quast@xxxxxxxx> wrote:


the Ray Intersection BB does not take into account the near or far clipping planes of the active camera. Of course this should be the default as no user will try to interact with objects or faces of objects not visible.

Is there any workaround known to pick only faces of objects visible in the frustrum of an active perspective camera?

May be a solution is to use the Ray Intersection BB. But how to compute the Ray Origin and Ray Direction on the basis of a window relative mouse position vector (click point)?

Klaus





-- To subscribe, go to http://lists.theswapmeet.com/virtools-user-group or e-mail: <mailto:virtools-user-group-subscribe@xxxxxxxxxxxxxxxxxxxxx> To post a message: send it to <mailto:virtools-user-group@xxxxxxxxxxxxxxxxxxxxx> To reply to the list and its author, use "Reply to All" --+--

Current Thread