SceneKit AR 游戏 fps 越来越低并且设备随着使用而变热 [英] SceneKit AR game fps getting low and the device getting hot with use

查看:22
本文介绍了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?

推荐答案

使用 ARKit 60 fps 的 6 DoF 跟踪以及 SceneKit 或 RealityKit 的 60 fps 渲染(多边形几何、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
  • 每个场景使用不超过 50K 的多边形(使用低多边形模型)
  • 不要使用光线追踪阴影(使用预烘焙或假阴影)
  • 尽量不要使用许多 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天全站免登陆