Which picking method would you recommend?


I have a 3d-file read in which can contain millions of objects. I´d like to add picking now so that the user can obtain properties of let´s say a bridge. In future it would be great to even change properties interactively. Which picking method would you recommend considering my rather low programming skills? Would you prefer the common OpenGL picking or the color-picking and why? (Shooting a ray or using glUnproject sounds too difficult to me)
Thanks for any help!

Firstly, I am assuming your millions of objects' are stored in some kind ofsoup’ with no internal structure such as BSP tree, Octree etc. If this is the case then shooting a ray would probably not be quicker than opengl picking. The advantage of ray-casting into the scene comes when you are quickly able to classify an object with respect to the ray, thus eliminating all subobjects from the search.

OpenGL picking is preferable to colour picking - for sure with that many objects.

The actual pickable objects are not millions, sorry, but about 200.000 max.
Thanks for the reply! Why would you not use color-picking? Is it because you have to render the scene twice - so a matter of efficiency?

edit: your assumption is right.
2nd edit: Yet couldn´t I assign a colour to only those objects lying in my frustum? That would raise efficiency enormously wouldn´t it?

[This message has been edited by Batti (edited 07-03-2002).]

[This message has been edited by Batti (edited 07-03-2002).]

OpenGL will clip to a frustum 1 pixel by 1 pixel in size (or whatever you set the pick to be) - so if you are not currently clipping to frustum in software, this will make sure everything is rejected. Also, OpenGL picking will return pick records in hierarchy (if you need this) and multiple objects at different depths at the same position.

Sounds convincing
Thanks again!