Wednesday, August 31, 2011

EQClassic - Zone Geometry Mapping II

I found a research paper today on an efficient vector tracing algorithm that does not require stepping to determine collisions with geometry in three dimensional space. Stepping is a technique which slowly extends a line from the origin point towards the destination, continuously gathering the list of nearby geometry and calculating the possibility of sharing the same physical space (forming a collision) with any of said geometry at the line's current location. It is a long and redundant process and the only way to ensure some manageable degree of accuracy is to keep the stepping increments small, thus, as the vector grows in size, so does the computational cost.

I implemented the proposed algorithm along with a visualization component in my zone explorer program this morning and it is obscenely fast and remarkably accurate. The most absurd part is that I am not even utilizing a tree to partition the zone's geometry list! The algorithm is so fast that it scans all 77,000 triangles in the Field of Bone for collisions before the zone explorer program drops a single frame. It will only get faster as I implement an octree to store the zone's geometry data. I cannot wait to benchmark this algorithm against our current line of sight solution (EQEMU's).

0 comments:

Post a Comment