Is there any way to load FBX file using ARKit?

后端 未结 4 819
时光说笑
时光说笑 2021-01-02 17:15

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 .fb

4条回答
  •  失恋的感觉
    2021-01-02 18:18

    Updated: September 11, 2020.

    Full info covering .fbx conversion setup, read HERE.

    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.

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

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

    usdzconvert file.fbx
    

    There are also nine flags for applying render passes generated in 3D package:

    usdzconvert file.fbx -diffuseColor albedo.png 
                         -opacity transparent.png
                         -metallic chrome.jpg
                         -roughness rough.jpg
                         -normal bump.png 
                         -occlusion ao.jpg
                         -emissiveColor emit.png
                         -clearcoat varnishing.jpg
                         -clearcoatRoughness ungloss.png                      
    

    To use this command line conversion tool, download USDZ Tools from Apple developer resource and FBX Python SDK from Autodesk developer resource. Don't forget to setup a global variables in macOS.

提交回复
热议问题