1

I was trying to do some investigation with ARKit. In its ARKit demo, either using ARSCNView or ARSession + metal, the performance is fine (on iPhone 6s, CPU about 50%). But if I replace ARSCNView with SCNView + ARSession, the CPU turns to over 100% after several seconds, and receive "[Technique] World tracking performance is being affected by resource constraints [1]" in the console.

Anybody knows why the SCNView reduces the performance vs ARSession + metal? And how does ARSCNView optimize with this issue?

Note: My demo project is simple: create a SceneKit based Game project, add following codes in the viewDidLoad function,

let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = .horizontal
arsession = ARSession()
arsession.run(configuration, options: ARSession.RunOptions(rawValue: 0))
Reeonce Zeng
  • 392
  • 4
  • 14
  • Are you rendering the live video behind the model or just the model? I have a project I've been working on where I also did ARSession + SCNView, but CPU ended up nowhere near 100%. – drewster Jan 04 '18 at 16:17
  • @drewster I doesn't render anything at all. It seems that this issue only exists on iPhone 6S(+) and iPhone 7(+). Tested on an iPhone X, the issue disappeares and CPU keeps at 40+%. – Reeonce Zeng Jan 05 '18 at 03:26
  • maybe it's just CPU difference? I know X is much faster than 6S. – drewster Jan 05 '18 at 18:00
  • Is there a specific reason why you need/want to use SCNView rather than ARSCNView, or is this more of just wondering why the performance isn't the same? There is a related topic here: https://stackoverflow.com/questions/45511838/technique-world-tracking-performance-is-being-affected-by-resource-constraints – drewster Jan 09 '18 at 20:00
  • @drewster I don't think they are the same issue as ARSCNView works well. I need to use SCNView as I want to modify the background video, and do some off-screen rendering with SCNRenderer. – Reeonce Zeng Jan 11 '18 at 02:29

0 Answers0