Is there any way to load FBX file using ARKit?

孤街浪徒 提交于 2020-07-05 10:47:11

问题


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

Is there anyway I could load fbx files?


回答1:


ARKit itself isn't loading models in 3D scene. It's a work for a SceneKit framework. SceneKit doesn't directly support .fbx now. You could implement a reading of .fbx file format via ModelIO but it's non-trivial thing.

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

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

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

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




回答2:


Try using AssimpKit to use your fbx file in a SceneKit scene.

AssimpKit currently supports 29 file formats (including fbx) that allows you to use these files directly in SceneKit without having to convert these to any of the files that SceneKit or Model IO supports thereby saving an extra step in your asset pipeline.

Other supported file formats:

3d, 3ds, ac, b3d, bvh, cob, dae, dxf, ifc, irr, md2, md5mesh, md5anim, m3sd, nff, obj, off, mesh.xml, ply, q3o, q3s, raw, smd, stl, wrl, xgl, zgl, fbx, md3




回答3:


You can download Reality Converter app from Apple. This allows converting fbx to usdz.



来源:https://stackoverflow.com/questions/56493972/is-there-any-way-to-load-fbx-file-using-arkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!