What are Xith3D users using for terrain - do people use the Terrain class much, or roll their own? How effecient is the built in terrain class?
I use my own.
It is based on a simple set of triangles. The triangles are created using the Delauney triangulation from arbitrary point sets. This triangle set is used for collision computation and transforming into the triangleArray used by xith.
To model the terrain I simply use a class which can “hammer” half-spheres (parameterized to size, radii etc) into the terrain to create hills, craters, ditches, rivers and so on.
My implementation is sufficient performance wise for my needs. I use a 2d grid of arraylists to cache the triangles for ray-triangle intersection computation to reduce the number of triangles to check.
The last time I checked (java 1.4.x / linux / P4 2Ghz) I got 50k-60k ray-triangle collision computations per second. This allows a good response time when for example catching the mouseMove event to project a virtual cursor on the terrain based on the mouse position.
Ca$