Extremely slow performance on Android

Hi guys,

I’m experimenting with jMonkey as a potential engine to power the Android port of http://itunes.apple.com/gb/app/brian-coxs-wonders-universe/id508465867?mt=8

However, just a simple scene with 3 spheres (32 x 32) and I get 4 FPS on both a Samsung Galaxy 1 and a HTC Sensation (the sensation is a pretty powerful phone).

Is there some recommended settings for bootstrapping the AndroidHarness? I’d expect 60FPS for what I’m trying to do here.

I got decent performance in my early tests using my Galaxy S2 and the latest nightly build.

I’ve not tried it recently or with more complicated scenes though. In fact that’s something I need to look into again soon.

What material do you use? lighting, unshaded?


I have now reduced the test app to 1 sphere (16x16), the texture is 100k in size, no translations are being applied.

Obviously is some config issue.


Should also add, same code in a normal desktop app is 2000FPS.

Use Unshaded instead of Lighting and the performance will go back up to 60

I was using lighting in my tests and it was fine. Only simple models though.

Try a cube not a sphere and a smaller texture?

You can use lighting, but you have to activate Vertex_Lighting.

Most android devices GPU are weak, and fragment lighting bring them down.

Of course Unshaded will be faster, but you’ll have to use smoke and mirrors to fake lighting.

Box boxshape1 = new Box(new Vector3f(-3f, 1.1f, 0f), 1f, 1f, 1f);

Geometry cube = new Geometry(“My Textured Box”, boxshape1);

Material mat_stl = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

Texture tex_ml = assetManager.loadTexture(“monkey.jpg”);

mat_stl.setTexture(“ColorMap”, tex_ml);




Figured out what it was.

Turned off verbose logging and voila.

1 Like

oh :stuck_out_tongue:

Yeah logging kills perf

Might be worth adding to the android “getting started” guide, as it sure threw me !

Added a note to https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:android to that effect.


Thanks @zarch that’s really appreciated