Linepick
Blitz3D Forums/Blitz3D Programming/Linepick
| ||
I need a solution for fastest linepick. Do you have something simple solution for change linepick for a faster method? thnx |
| ||
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? |
| ||
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 |
| ||
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. |
| ||
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 |
| ||
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... |
| ||
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. |
| ||
KuRix: what are ode ray collisions and trimeshes? |
| ||
I don't know ODE but I'm intresting for this ray collision. What is it? |
| ||
ODE is the open dynamics engine, a physics dll. http://www.ode.org/ |