SceneKit AR游戏fps变低且设备使用时变热 [英] SceneKit AR game fps getting low and the device getting hot with use

查看:131
本文介绍了SceneKit AR游戏fps变低且设备使用时变热的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ARKit和SceneKit开发3D游戏.游戏以60 fps的速度流畅运行,但是当我持续使用一段时间后,设备发热,帧频降至30 fps.能量影响非常大,我在Instruments中注意到了一些东西.我将显示统计数据以及在Instruments中看到的内容.这是游戏平稳运行时的统计信息,但我不明白为什么节点数达到1.16K的原因.实际上,我并没有使用太多的节点,但这只是一个简单的层次.

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.

这就是我在Instruments上获得的信息,我不知道这意味着什么. 如您所见,能量影响非常大

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

如何找出为什么fps变低而设备变热的原因?

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

推荐答案

使用60 fps的ARKit的6 DoF跟踪以及60 fps的SceneKit或RealityKit的渲染(多边形,PBR着色器和阴影的渲染)对于处理器和图形单元.它还会很快耗尽电池电量,并使手机产生大量热量.对于AR,VR和AI应用来说,这是一个普遍的问题.

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:

  • 保持模型的多边形总数不超过10K
  • 每个场景使用不超过5万个多边形(使用低多边形模型)
  • 不要使用光线跟踪的阴影(使用预先烘焙的或伪造的阴影)
  • 尽量不要使用许多PBR着色器,例如金属或反射材料
  • 尝试降低跟踪帧速率以及(如果需要)渲染帧速率
  • 考虑到物理会消耗很多处理能力
  • 请勿在3D模型中使用高分辨率JPEG或PNG纹理
    • 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
    • 这篇关于SceneKit AR游戏fps变低且设备使用时变热的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆