我想将 .obj
或 .dae
等 3D 文件转换为扩展名为 .arobject
的 AR 资源对象。
有什么办法吗?
最佳答案
.arobject
是您可以在对象检测 session 中使用的特殊 map 。它不是 3D 模型,而是:
The description of a real-world object you want ARKit to look for in the physical environment during an AR session (it's an excerpt from official documentation).
您可以使用以下两种简单方法之一制作.arobject
文件:
将 3D 检测对象的图像放入 Xcode 的
Assets.xcassets
目录中。使用以下方法写入对象的二进制表示。
func export(to url: URL, previewImage: UIImage?) throws
关于swift - ARKit – 将 OBJ 或 DAE 转换为 arobject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57869477/