"Optimize Game Objects" performance question on android devices

Hi !
I test the performance of Model Importer option - “Optimize Game Objects” on Samsung Galaxy Note 3. When I test the option on my PC, Optimize-ON is much better than Optimize-Off. But the profiler results(Animator.Update + MeshSkinning.Update) are similar on Galaxy Note 3.

Optimize-ON
Animiate.Update 12.29ms
MeshSkinning.Update 8.08ms

Optimize-Off
Animiate.Update 13.09ms
MeshSkinning.Update 6.34ms

The profiler pictures are in the attachment.

There is extra cost(Animator.SendTransformChanged) in Optimize-Off, but its MeshSkinning.Update is less to compensate.

My question is whether Optimize-ON is suited for mobile devices or not ?
I hope the improvement of Optimize-ON on mobile devices is as good as using on the PC.
What I need to pay attention to the use of Optimize-ON ?

1922713--124142--op_pic.PNG
1922713--124143--noneop_pic.PNG

Hi Wanban,

Can you log a bug with your project? so we can investigate what going on. It should be faster.

yes

yes

The only drawback is that you can’t access anymore the transforms unless you expose them,.
Also if you do have some special setup on your rig like extra transform used as handle for props they will all be removed too.

Hi Mecanim.Dev,
Thank you for your reply.

I have log a bug report. CaseNo: 664193
http://fogbugz.unity3d.com/default.asp?664193_amsbv59mmc7v9aa9

I’m looking forward to your reply

Hi wanban,

I did past the information to our Android team, they will take a look.

Best regards,

Getting the same results on iOS. Selecting optimize game objects does get rid of the hierarchy but the performance is mostly the same or a little worse at times

Hi Mecanim.Dev,
Is there any progress about the question ?
Do you suggest opening optimize-on for mobile devices ?

Not yet sorry.

What do you mean by opening optimize-on for mobile devices?

Sorry ! My English is a little weak.

Our project is a game on iOS and android devices. I mean whether “Optimize Game Objects” is a better option in most mobile devices or not.

It should always be a better option on all devices.

It’s only optional because some people want the transforms.

So after some investigation it turn out that in your case the bottle neck is not the transform hierarchy but rather dynamic batching and single thread rendering.

Here the answer from our android specialist
“So turn off dynamic batching. In this case I would assume dynamic batching would only cause more harm than good. Secondly since we want to scale to multiple cores I would suggest enabling mutithreaded rendering.
If they do that they should clearly see the difference between the optimized version and the non-optimized one.”

Let me know if does help,
Regards,

1 Like

Hi Mecanim.Dev,
Thanks for your reply !
We make a profiler about multithreaded rendering, dymamic batching and GPU skinning options. There are only 100 skinnedmesh characters in the scene and the results are as follows.

Optimize Game Objects multithread dynamic GPU skinning FPS drall call

  • X O X X 38-45 112
  • O O X X 44-52 112
  • X X O X 30-40 112
  • O X O X 31-41 112
  • X X X O 33-36 212
  • O X X O 30-36 212
  • X O O X 39-48 112
  • O O O X 39-52 112
  • X O X O 38-42 112
  • O O X O 40-44 112
  • X X O O 32-36 212
  • O X O O 32-36 212
  • X O O O 38-42 112
  • O O O O 38-43 112
  • X X X X 28-32 112
  • O X X X 28-39 112

1956731–126562–profiler_0209.zip (703 KB)

Sorry, the layout of results looks a mess. We test all combinations of Optimize Game Objects, multi-threaded rendering, dynamic batching and GPU skinning options. X O X X 38-45 112 means disabling “Optimize Game Objects”, enabling “multi-threaded rendering”, disabling “dynamic batching”, disabling “GPU skinning”, FPS is 38-45 and draw call is 112.

The enabling multi-threaded rendering and disabling dynamic batching is the best combination but I have some questions.

  • There are only 100 characters using the same skinnedmesh(459 verts(position, normal, uv), 658 tris) in the scene. According to Unity documents dynamic batching is applied only to meshes containing less than 900 vertex attributes in total. And I always thought dynamic batching was not applied to skinnedmeshes. Why did dynamic batching work in this case ?
  • GPU Skinning seems not to improve the performance. There are extra 100 draw call in some cases. Is this a bug of Unity profiler on mobile devices ?

Hi Wanban,

I don’t know enough this part of Unity to give you a good answer, I will try to find someone that can answer your specific question.

Best regards,