Voxel Terrain

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com