Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to load FBX file using ARKit?

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?

like image 279
vineeth s thayyil Avatar asked Jun 07 '19 12:06

vineeth s thayyil


People also ask

How do I load a FBX model?

In the “Layout” tab, click “File” in the top-left corner of the screen. Hover over “Import” and select “FBX (. fbx)” from the drop-down menu. Select and open your desired FBX model into Blender.

Can FBX be converted to OBJ?

FBX files are easy to convert to OBJ. Read on to learn more about the file formats and a few easy FBX-to-OBJ converters!


Video Answer


4 Answers

Updated: April 28, 2022.

Info covering .fbx conversion you can find HERE.

ARKit is not capable of 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 challenge for developer.

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 13/12/11.

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.

If you prefer GUI, use Reality Converter app.

like image 166
Andy Jazz Avatar answered Oct 21 '22 23:10

Andy Jazz


June 2020

To convert FBX to USDZ you need the usdzconvert utility from Apple. To get it to work, read the install instructions carefully.

You will need both the "FBX Python SDK" and the "FBX Python Bindings" from here.

Please note that the current (June 2020) version of the FBX Python SDK is 2020.1, so you'll have to change the following line in USB.command

# export PYTHONPATH=$PYTHONPATH:/Applications/Autodesk/FBX\ Python\ SDK/2019.0/lib/Python27_x86

to

export PYTHONPATH=$PYTHONPATH:/Applications/Autodesk/FBX\ Python\ SDK/2020.1/lib/Python27_ub

To use usdzconvert, double-click /Applications/usdpython/USD.command and type usdzconvert into the terminal that opens up.

That's it!

like image 24
vfxdev Avatar answered Oct 21 '22 21:10

vfxdev


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

like image 2
Ozgur Sahin Avatar answered Oct 21 '22 23:10

Ozgur Sahin


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

like image 1
M Reza Avatar answered Oct 21 '22 21:10

M Reza