• Advertisement
Sign in to follow this  

practical solution for picking/selecting objects?

This topic is 4864 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I searched on Google and read some articles about picking objects in 3D, but I still can't decide which method I should use. I want to do not only picking, but selection as mouse moving, and possibly group picking as well for future projects. Is OpenGL picking good enough for this? Should I go with ray-intersection method?

Share this post


Link to post
Share on other sites
Advertisement
loads of ways to do this.

Ray-intersection, if you want to code a ray-casting algorithm. Not hard, but it takes time. YOu'll also need some frustum clipping, for drag selection.

Another way is to use the OpenGL feedback system. either, render each object or groups of interest with a single unique and plain colour (no transparency, no lighting, no texture, nothing), see what colour you get underneath the pixel, that will give you the object.

Set the viewport to the pixel, or the area you are interested in. Use the feedback systems from OpenGL/DirectX9, which will tell you if an object has passed various render stages (especially the clipping stage), how many polygons have been drawn, ect...

I'd favor the last solution, quick, simple, hassle-free.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement