Terrain rendering demo for Android

Hi,
here’s my terrain rendering demo/testbed for Android using LibGDX.
Currently, Geomipmapping and SOAR methods for terrain LOD are supported.

Controls:
In main menu you can select LOD method and LOD tolerance
(error projected to screen space…) - 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 :slight_smile:
On desktop you can also use these keys when viewing terrain:
W/Up - forwards, S/Down - backwards, Ctrl - move really fast, +/- change tolerance, O - toggle wireframe overlay.

Links:
Play Store page
Desktop version JAR

Screenshots:

Limitations:
Needs at least 2048x2048 max texture limit, 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.

Crash reports, performance reports, and other reports will be appreciated.

Looks really nice, however i still noticed one bug at the seams:

Also the walking was really-really slow for me.

Hold Ctrl for a boost :wink:

To OP: Really nice, reminds me of PlanetSide2, massive landscapes!
No crashing or other problems detected, getting about 350-450 FPS on HD 4670 (Desktop, ofc)

Exits without a trace after trying to start the actual demo (the start-up/options screen works fine). This is on my work pc (Windows XP 32 bit, Radeon HD 6350).
Haven’t tried the Android version yet, because my mobile connect is pretty lame here ATM.

Edit: Works fine on Android 4.2/Nexus 4, ~60fps with Geomipmaps, 35-40fps with SOAR.

Yes the boundaries of geomipmap tiles with different LOD could look better.
Only simple skirts around tiles are used now.
The reason I put skirts in is actually something not seemingly related:
no support for wireframe polygon fills in OpenGL ES.
So I’m using barycentric coordinates for wireframe overlay
but that puts some restrictions on geometry. Could be avoided given more time :stuck_out_tongue:

Walk speed: As BurntPizza points out CTRL is the magic key :slight_smile:

Could be some outdated OpenGL drivers? Could you please check GL info reported by the program (“Show GL Info” button in menu)?
Or run the JAR from console (there should be some stack dump)?

Nice performance on Nexus 4, probably will have to add some bigger terrains to stress the newer devices more :o

Cool demo. ran at 56 fps on my old samsung galaxy s 1.

Looks really good. 30FPS and quick loading on a HTC Rhyme

GL info button displays…some gl info. Looks fine to me at first glance. The drivers aren’t current, maybe 1.5 years old.
And this is the stack trace:


glTerrain: Vertex shader(s) linked, fragment shader(s) linked.
glTerrain: Vertex shader(s) linked, fragment shader(s) linked.
glTerrain: Vertex shader(s) linked, fragment shader(s) linked.
glTerrain: Ground tex loaded in:  107 ms
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NullPointerException
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:112)
Caused by: java.lang.NullPointerException  
	at com.galfarslair.glterrain.TerrainRunner$TerrainBuilder.processState(TerrainRunner.java:425) 
	at com.galfarslair.util.SequenceExecutor.execute(SequenceExecutor.java:22)
        at com.galfarslair.glterrain.TerrainRunner.render(TerrainRunner.java:177)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:186)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:109)

Can you plz send me apk file, sorry don’t have wifi :wink:
Really want see performance on my device.

You can find APK for download here: http://sdrv.ms/14mN4Ia
v0.30 is the latest one.

Ty

10-12 fps =)
Geo
Soar not support
prestigio pmp3270b
CPU Cortex A8

Thanks for the report. I was suspecting shader compiling but this points to texture creation.

~30 fps on my Huawei G300. (Adreno 200 gpu)

SOAR might have been ever so slightly slower than geomipmapping, but it’s hard to tell without a deterministic benchmark.

One should use SOAR within each geomipmap tile for best results.

Some benchmark flyover mode is planned.
SOAR test actually runs with only 512x512 terrain compared to 1024x1024 in Geomipmapping test
(SOAR is limited so that the app can fit in 32MB of RAM).