Perfomance question, Is it best JME can do?

Did you enable hardware skinning for the animated models? IIRC at some point it became the default for jme, but i would check it anyway.

thx, I will check little bit later.

It is default as of 3.1-alpha1 iirc.
If you arenā€™t running 3.1 you might gain a performance increase by upgrading anyway.

But to be honest: Unity is built by hundreds of professionals spending 7 hours a day on improving the speed and such.
You canā€™t expect Jme to be better than that, honestly weā€™d be lucky if we can roughly keep up, so that test is a bit bad.

You might have found an issue in JME but even then Unitys Performance is hard to beat, so if thatā€™s your only concern you should see how you can improve performance on their side.
And yes, they do auto batching at least for some meshes.
Maybe they also run Unshaded where JME is running Shaded?

Having built an android game in JME (a couple years ago) I can tell you the garbage collector will be one of your biggest enemies (at least the dalvik one is), I didnt check if their new one is standard yet. Half of my time was spent modifying jME source code to remove as much garbage collection as possible (among other things). Hardware skinning is a must, software skinning generates too much garbage. In my first tests I had really bad perf, did some profiling and turns out my phone could not support the amount of bones I was using in the GPU, so it defaulted back to software skinning, so I redid my model, increased performance a lot. Had to create my own batched GUI, because object count is another killer, so my whole UI was 1 object (animated by modifying the underlying buffers), worked very well. Replaced some use of Bullet library with a custom built physics engine to suit the needs only for my game. What I am trying to say is, there is no out of the box solution for this, no matter the platform. You will struggle with that many different animated models, and need to think of a smart solution to solve it, which involves a lot of time and headbanging.

1 Like

ohhhh Wezā€¦ Welcome back buddy :wink:

1 Like

Ofc, we can keep up. :chimpanzee_amused:

Once again, because I think the op has misunderstood me. Basically what I was saying is that the Unity test that the op conducted was flawed, in the sense that Unity used 1 object of 2k-3k vertices 150x times.

Itā€™s in the opā€™s best interest to try the unity with different models now, so that if he decides to go with Unity, he is not disappointed that it cannot handle 150 different animated models.

Regarding optimization, here are some tips:
-Shaders: simplify these, especially fragment shaders. If you use lights, consider baked textures with color, light, ao, etc.
-You can consider using lod, simplified meshes for far away objects.
-One mobile MORPG that displayed animated characters of players used a clever trick: If it detected that the frame rate was dropping, It replaced distant players by animated silhouettes(about less than 100 vert each).
-There are plenty of ways to optimize or find compromises, other than that also dont forget to profile and find where your bottleneck lies.

1 Like

Hey Remy :slight_smile: Iā€™ve been hiding in the shadows for a while, this forum has always been a good source of entertainment for me :slight_smile:. Just thought I would chime in (when I can).

1 Like

It does not.

Well, youā€™re right, it was switched off, and it was a part of the problem, I get boost, to 60 models, until i get 25 frames. Itā€™s much better then 10 models, but still way too low. Any more suggestions?)

Iā€™ve checked it out, just now. but I didnā€™t feel any boost.

Honestly Iā€™m big fan of the open source so, yeah i was hopingā€¦ May be after ā€œgame releaseā€ I will try to see if I can do smth to help this projectā€¦

Well, if iā€™m only adding models to the screen, I cannā€™t understand what garbage I have to collect[quote=ā€œThe_Leo, post:26, topic:36920ā€]
Once again, because I think the op has misunderstood me. Basically what I was saying is that the Unity test that the op conducted was flawed, in the sense that Unity used 1 object of 2k-3k vertices 150x times.

Itā€™s in the opā€™s best interest to try the unity with different models now, so that if he decides to go with Unity, he is not disappointed that it cannot handle 150 different animated models.
[/quote]

I understood, but even after testing with 5 different models, randomly mixed up, and animated separetlly, there was no significant changes in the perfomance.

Well, as I said, camera is almost fixed, it only turns around the center of the scene, any way, automaticly generated lods didnā€™t give any boost. We will try out another model with different amount of bones and polygons, may be this will cause some effect,

Have you profiled your app with the Android Device Monitor like people have mentioned? Check out the heap allocations and youā€™ll find out what I mean (I suspect it is still doing Software skinning which allocates a lot of memory.)

Did you check if the number of vertices is the same in jme and unity?
It might be that the exporter you are using for jme doesnā€™t export correctly (or doesnā€™t support at allā€¦) shared vertices (ie. same vertices for multiple polygon instead of duplicates).