I want to build an AR game where buildings can occlude content. Should I build an occlusion mesh for every building I want occlusion/collision. I am kind of new to ARKit but I saw that I can create a metal renderer to work with ARKit. Can I get depth information using a convolutional neural network from metal?

Throwing machine learning at it sounds like a super fun project, I would recommend to start a bit simpler.

So as a small experiment you can take the four corners of a building from the Maps app and then create four Location Anchors based on these coordinates. As soon as those are tracked you can look at the local coordinates (in x,y,z) and then build a polygon based on it, you can extrude it towards the sky (y up) to get a nice collision/occlusion mesh.

Tagged with: