# Ocean Grids

RenderWorld's ocean surface is generated as a single patch of a periodic grid (i.e. the surface repeats itself every couple hundred meters). The size of the patch (in grid points) and facet spacing between grid points are user inputs. The disadvantage of a periodic ocean surface is that if the periodicity length becomes too small it shows up in the final images. The advantage is that the memory savings make the whole idea of an ocean surface stretching to the horizon feasible. Similarly, small grid spacings provide lots of rich detail, but eat up memory and increase rendering time.

RenderWorld provides a solution to this by using multiple surface grids. Typically, a grid with course spacing (e.g. 512 by 512 with 2 meter spacing) is combined with a fine resolution grid (e.g. 1024 by 1024 with 0.03m spacing, which is about 31 meters on a side). In this manner we achieve very high surface resolution without substantial periodicity in a reasonable amount of memory. A rule of thumb is that the fine scale grid should not fit evenly into the coarse grid. In other words, if the coarse grid is 1000m, the fine grid should not be 10m, but 10.5 meters would work well. Powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, etc.) are recommended for grid sizes, but not required.

Contents