Linepick

Blitz3D Forums/Blitz3D Programming/Linepick

Mike0101(Posted 2006) [#1]
I need a solution for fastest linepick.
Do you have something simple solution for change
linepick for a faster method?

thnx


jfk EO-11110(Posted 2006) [#2]
You may have to explain if you need all the features of linepick. If you only need to pick a single mesh to get the picked triangle then there may be a dll (I think it was the coldet wrapper). One trick that was used to ckeck the visibility of stuff was the ICU method, but of course its usage is very limited (although very fast).

You have to know Linepick is slow by its nature. It has to scan trough all pickable meshes/Triangles, therefor it will become slower the more meshes are in the scene.

So what features of Linepick do you need?


Nicstt(Posted 2006) [#3]
limit linepick to an area

have various objects in different sections

then only linepick a section when it falls within a specified variable range.

works in some cases


jfk EO-11110(Posted 2006) [#4]
Yeah, Nicoust is right. You may get a speed boost if you prepare the scene for the linepicks: make everything unpickable that isn't within the range or direction of the pick. (Although, not sure if Blitz is already doing this)

Plus: if you are doing long range picks you may add a surrounding box around the scene (especially with cameraPick!), so the picking will be skiped if it hits the "end of the universe" that is represented by the box's walls. You may use CreateCube/FlipMesh for the box.


Mike0101(Posted 2006) [#5]
I need linkpick for many reasons.
Now the most important: Find the highest point of a collided object for climbing.
Other: What can see the NPC


KuRiX(Posted 2006) [#6]
I use ode ray collisions with trimeshes (is the same as linepick) and i think is much faster because ode has built-in space trees and coherency cache...


Dreamora(Posted 2006) [#7]
What can the NPC see: Definitely nothing I would do through line pic. This does not need to be triangle perfect after all.

So using a simple "tri plane test" (or full view frustrum if 3D viewfield) against bound sphere or similar would be enough and much faster than true collision tests.


Sir Gak(Posted 2006) [#8]
KuRix: what are ode ray collisions and trimeshes?


Mike0101(Posted 2006) [#9]
I don't know ODE but I'm intresting for this ray collision.
What is it?


jfk EO-11110(Posted 2006) [#10]
ODE is the open dynamics engine, a physics dll. http://www.ode.org/