Right now I can save what I created in ARKit as a scene file, and load it back later.
sceneView.scene.write(to: path, options: nil, delegate: nil, progressHandler: nil)
But is it possible to save the scene as USDZ file and load it back?
Right now I can save what I created in ARKit as a scene file, and load it back later.
sceneView.scene.write(to: path, options: nil, delegate: nil, progressHandler: nil)
But is it possible to save the scene as USDZ file and load it back?
First of all, read the following SO post that is very helpful.
For converting OBJ model into USDZ model, for example, you need to import SceneKit.ModelIO module at first. Then use the following code:
let objAsset = MDLAsset(url: objFileUrl)
let destinationFileUrl = URL(fileURLWithPath: "path/Scene.usdz")
objAsset.exportToUSDZ(destinationFileUrl: destinationFileUrl)
In Xcode 10: only OBJ-to-USDZ, single-frame ABC-to-USDZ and USD(x)-to-USDZ conversion is available via command line:
xcrun usdz_converter file.obj file.usdz
In Xcode 11/12/13: you can use even more input formats to convert them into USDZ via command line: obj, gltf, fbx, abc, usd(x).
usdzconvert file.gltf
In Xcode 12 and later: you can use a Reality Composer software for converting any RC scene into usdz file format (right from UI). Also, there's a Reality Converter standalone app.
P.S.
And, of course, you can use Autodesk Maya 2020 | 2022 with Maya USD plugin.