3

I'm developing a 3D game with ARKit and SceneKit. The game running smoothly at 60 fps but when I keep using it for a while the device get hot and the frame rate drop to 30 fps. The energy impact is very high and I noticed something in Instruments. I'll show the statistics and what I see in Instruments. This are the statistics when the game is running smoothly but I don't understand why I get 1.16K as the nodes count. I actually don't use so much nodes but it's just a simple level. enter image description here

This is what I get on Instruments, I don't know what it means. enter image description here As you can see here the energy impact is very high enter image description here

How can I find out why the fps getting low and the device getting hot with the usage?

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
I Don't Tell
  • 264
  • 1
  • 15

1 Answers1

3

Using ARKit's 6 DoF tracking at 60 fps along with SceneKit's or RealityKit's rendering (of poly geometry, PBR shaders and shadows) at 60 fps is extremely heavy burden for the processor and graphical unit. It also drains your battery very fast and makes the phone generate a lot of heat. For AR, VR and AI apps it's a common issue though.

To lower an energy impact follow these recommendations:

  • Keep the total number of polygons of your model not more than 10K
  • Use not more than 50K polygons per a scene (use low-poly models)
  • Don't use ray-traced shadows (use pre-baked or fake shadows)
  • Try not to use many PBR shaders, like metallic or reflective materials
  • Try to lower a tracking frame rate and, if needed, a rendering frame rate
  • Take into consideration that physics consumes much processing power
  • Do not use high-resolution JPEG or PNG textures for your 3D models
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
  • Thanks for your reply! I'll try to follow your recommendations. Do you suggest me to run my game at 30 fps? – I Don't Tell Jul 13 '19 at 09:19
  • It depends. Sometimes it's better to lower a frame rate and get less perfect tracking and rendering than to lose a user due to CPU and battery issues in your game. – Andy Jazz Jul 13 '19 at 09:35
  • @DanieleCiti, is this info useful for you? – Andy Jazz Jul 16 '19 at 12:45
  • Yes sure. I did something to make my game FPS stable the best I can. I’m still wondering why although I have about 20-30 nodes in my scene, the nodes count is so hight in the scene statistics. – I Don't Tell Jul 17 '19 at 13:08
  • 1
    I don't know how your code looks like but I think it's due to the fact you've used `renderer()` method which made all those 1000 unnecessary nodes. – Andy Jazz Jul 17 '19 at 16:47