Perfomance question, Is it best JME can do?

Our small team was looking for an engine for a 3d game for a mobile platforms, RTS kinda thing. We started from perfomance testing, cause we need about 200 models (about 2 000-3 000 polygons each), at the same time on the screen without lags, on the worst device we could find, plus some effects would be nice too. Our first gues was Unity, but it could handle only 150 models, with droping down to 25 fps. I was hoping jMonkey will kick it, but it went down to 19 fps after first ten models where added to the screen. The project is attached and i wanted to ask if there any optimisation we can do to get better perfomance? Also there is a unity apk so you can see the real perfomance difference on any device.

Link

Are your models dynamic or static? If static, you could use batching.

Dynamic with animation, GeometryBatchFactory looses animation, Adding everithyng to BatchNode didn’t give enough(or any) boost. Also BatchNode.batch(); loose all the animations with no perfomance gain lol

I might be wrong since I’m not really up to date on mobile device capabilities, but 200 models at 2k-3k is a bit much isn’t it?

LOD levels?

Eayh, that’s why we started from perfomance testing… and for now, But 10 models at 2k-3k poly, to drop down to 19 fps… It’s rediculous.

No chance, static camera, and same distance to all objects. And btw autogenerated lod levels gives no effect on perfomance

Is it supposed to look like this?


Also, those models look far enough away from the camera for a lower lod level imho.

Since you posted an apk, I assume you’re targeting Android? The worst android device one can find is pretty damn bad and there isn’t a chance that it’ll run your demands in a million years even if you wrote it in assembler.

200 objects with 2000 polys brings you to nearly half a million polygons. Low end devices can handle up to like 10K I’d say. The object count is also a problem, since you need to keep your draw calls super low. Like below 50 low.

To support the OP, on android jme is really not very performant.

Edit: you are nearly always in the cpu limit on droid. Even drawing 100 quads where a problem for my one plus one.

Hmm. Interesting. I have quite high object and vertex count in LSF Blueprint Builder, but looks like it runs ok on my mid-range phone.
I mean the performance could be better, but I don’t see any mayor problems with performance right now.

Yeap, it should lok like this, as this is a problem between blender export and jMonkey import, and this is the least of my problems right now, as with such perfomance we almost ready to go with Unity, we are waiting for one last test on Unreal engine, As Unity somhow can handle 150 animated models, with no batching and lod levels. And by worst android device I could find, I meant Lenovo A536, running Android 4.42. if we cannot handle even such a modern device, then we can just screw the whole idea)

Well then may be you could look at my project and tell me what gone wrong?)

Oh, well that is almost 10 times better than what I had in mind, at least looking at the benchmarks. :smile:

150 models, 2-3k each on mobile and 25 fps?
Well first question. is it the same model or 150 different models and where they all visible at once?

I wonder if the mobile you tested it on supports GL_NV_draw_instanced or GL_EXT_draw_instanced.

Yeap, 150, same models, 2k poly, visible at once, cause in the final game there could be different models, with different animations started.
About support of GL_NV_draw_instanced or GL_EXT_draw_instanced. Well, I’m not really sure how to check it

I suppose this also works for Android:

https://jmonkeyengine.github.io/wiki/jme3/advanced/read_graphic_card_capabilites.html

And this might also help you:

https://jmonkeyengine.github.io/wiki/jme3/intermediate/optimization.html

Tnx, I’ve already read second link, before posting here, it didn’t help. And I will check first link later.

1 Like

Well that explains the 25 fps performance on Unity, while jme got 19 fps for just ten. While you consider it low, it actually is exceptionally good for such test case on mobile.

The thing is, I believe unity optimized your models and animations since they were the same.
Jme on the otherhand did not optimize them.

In other words I would suggest to try displaying different models using unity and checking the performance. It is highly likely as you display 10 different models to get similar fps to jme. (eg. just modify few vertices to create a different model for such test case)

From Unity documen

I have not said that unity batched your models, but possibly optimized them.