How to use USDZ files with ARKit / SceneKit

Tsutsumi Shuichi
Sep 8, 2018 · 1 min read

The .usdz format is a “universal” format, but the WWDC18 session does NOT show the concrete way to load 3D models from usdz files in ARKit or SceneKit projects.

Here is the way:

guard let url = Bundle.main.url(forResource: name, withExtension: "usdz") else { fatalError() }
let mdlAsset = MDLAsset(url: url)
let scene = SCNScene(mdlAsset: mdlAsset)

That’s it. Anything is not special for the `usdz` format.

You will need

import SceneKit.ModelIO

to initialize SCNScene from MDLAssset.

This implementation is available on iOS 10 or greater because USD format has been supported since iOS 10. You don’t need to wait for iOS 12.

MDLAsset currently supports following formats:

  • .abc
  • .usd .usda .usdc
  • .usdz
  • .ply
  • .obj
  • .stl

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade