The Voxel Terrain is a recreation of the classic Comanche voxel terrain. It was a project that Santiago Moreno and I made during the last year of our HND at ESAT. It was made in C and ARM Assembly targeting a Raspberry Pi with the objective of optimizing the algorithm. We divided the problem into two parts: the sampling of the heights and the render.
For the sampling process, we used a horizontal unit vector. The important part is to sample horizontally instead of vertically to avoid cache misses. Also, we introduced LODs to avoid sampling the same pixel twice and get fewer samples with the same result. To render, we introduced occlusion culling to avoid painting all the heights from bottom to top, we draw them horizontally and then tilled and rotated them to keep the cache-friendly process. In all the processes we used Fixed-point arithmetic, avoiding type conversion and float point types in order to use integers.
Leave a Reply