有什么方法可以使用ARKit加载FBX文件吗? [英] Is there any way to load FBX file using ARKit?

查看:409
本文介绍了有什么方法可以使用ARKit加载FBX文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我正在使用ARKit投影3d文件.我可以投影.dae.obj格式模型.

In my project I am projecting 3d files using ARKit. I am able to project .dae and .obj format models.

反正我可以加载.fbx文件吗?

Is there anyway I could load .fbx files?

推荐答案

ARKit不在场景中加载3D模型.这是SceneKit或RealityKit的工作.但是,两个框架都不直接支持.fbx文件格式.您可以通过 ModelIO 来实现对.fbx文件格式的读取,但这是一项不平凡的任务

ARKit isn't loading 3D models in a scene. It's a job for SceneKit or RealityKit. However both frameworks don't directly support .fbx file format. You could implement a reading of .fbx file format via ModelIO but it's a non-trivial task.

准备模型以在ARKit,SceneKit和RealityKit中工作的最佳方法是将其转换为

The best way to prepare your model for working in ARKit, SceneKit and RealityKit is to convert it into .usdz file via new usdzconvert command found in Xcode 11 and Xcode 12.

要将.fbx文件转换为.usdz,只需在终端中输入以下行:

For converting .fbx file into .usdz just type the following line in Terminal:

usdzconvert file.fbx -diffuseColor diff.jpg -normal norm.jpg -occlusion ao.jpg

要使用此转换工具,请从开发人员资源中下载 usdz工具并且不要忘记设置全局变量.

To use this conversion tool, download usdz Tools from developer resource and don't forget to setup a global variables.

有关其他信息,请阅读发布.

For additional info please read THIS post.

这篇关于有什么方法可以使用ARKit加载FBX文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆