I finally got around to releasing Android terrain rendering demo I’ve been working on last few months (a few moments here and there). I did the bulk of work in November 2012, partly described in posts Porting glSOAR to Android and OpenGL ES, Part 1 and Porting glSOAR to Android and OpenGL ES, Part 2 – third part is still just a draft 🙁
Anyway, here’s the current version which supports Geomipmapping and SOAR terrain rendering methods. Gritty details about the internals will follow in some future post. There is also a nearly identical desktop version for reference, advantage of using LibGDX for this.
Downloads and Installs
glTerrainJava for Desktop v0.30
» 15.3 MiB - 1,791 hits - June 18, 2013 (last update July 4, 2013)
Desktop version of Java terrain rendering demo.
When the demo starts you get to the main menu screen. Here you can select terrain LOD method and some parameters. Important one is “tolerance in pixels” which controls when part of terrain switches to coarser representation. Basically, lower tolerance = better quality = lower performance.
On Android, just check “autowalk” in menu and later swipe finger on display to look around and change direction. Better/more controls are in todo list. On desktop, you can also use these keys when viewing the terrain:
W/Up – forwards,
S/Down – backwards,
Ctrl – move really fast,
+/- change tolerance,
O – toggle wireframe overlay.
- Benchmark mode – terrain flyover
- Some instructions inside
- Controls for walking over the terrain on keyboard-less devices
- Geomipmap tiles without skirts
- LOD method using vertex texture fetch, will it actually run on any phone?
- multithreading for mesh refinement
Needs at least 2048×2048 max texture size (4096 on desktop as more detailed texture is used), GL_OES_element_index_uint for SOAR, and GL_OES_standard_derivatives for wireframe overlay. For instance, SOAR won’t run on Galaxy S3 with Mali-400 MP GPU. Also, wireframe overlay is only for Geomipmapping (uses barycentric coordinates for wireframe).