1. IntroductionWhen managing access to very large terrain extensions it becomes absolutely necessary to tile the terrain so that it can be dynamically loaded/unloaded with a separate thread. That way, the memory size isn´t a limitation any more (it's only a limitation to the terrain that is intended to be rendered in every frame, not to the terrain that can be handled). Some obvious approaches have been used, but, as far as we know, no approach has been proven to be as efficient as the one we will present here: the super frustum. We'll discuss in this article three different techniques to decide which terrain zone should be loaded. 1.1. Algorithm evaluationIn order to decide if an algorithm is good or not we've chosen three criteria:
2. Algorithms2.1 Rectangular matrix around the viewpoint.This is the approach described by Renato Bruno Pajarola in "Access to large scale Terrain and Image Databases in Geoinformation Systems", and, as we will prove, it's the worst one in the terms we have described. The approach is basically to keep loaded in memory all the cells that are less than sizeX in the X axis and sizeY in the Y axis from the cell the viewpoint is in. Adaptability to the view frustum:
Leads us to draw only the 15-25% of what is loaded. Data transfers between disk and memory:
Risk of desynchronizing the loading and the drawing processes:
2.2 Rectangular matrix containing the frustum projection on the y=0 plane.This algorithm is really a variation of the previous one. The limits of the matrix are determined by the points (xmin,ymin) and (xmax,ymax), which are calculated from the cells containing the projections of the frustum's 3 points (although it has 8 points, it can be approximated with 3). As a little improvement, security borders can be defined in both X and Y axis, to prevent the camera moving faster than the loader thread loads when turning the viewpoint. Adaptability to the view frustum:
Data transfers between disk and memory:
Risk of desynchronizing the loading and the drawing processes:
2.3 Super FrustumThis is in our opinion the optimum solution to the problem we are dealing with. We will define a Super Frustum as a geometric entity that contains the frustum and that introduces some extra space that gives us an efficient way to pre-fetch terrain tiles. A Super Frustum can be 2D (defined by a triangle that contains the frustum's 2d projection) or 3D (defined by a pyramid similar to the frustum that contains the 8-point defined view frustum). This would be a 3D Super Frustum: The 2D version is not as accurate as the 3D one (some care must be taken with vertical pitch angles) but needs less CPU work. Both can be interesting depending on the particular application. In both cases, the Super Frustum can be fully parameterized depending on the system we are running on. Adaptability to the view frustum:
Data transfers between disk and memory:
Risk of desynchronizing the loading and the drawing processes:
|
|