Use FBX file with 3D model in iOS native app

Michael Kessler picture Michael Kessler · Jun 5, 2016 · Viewed 9.5k times · Source

I have a requirement to display an interactive 3D model (the client supplies few FBX files) in one of the screens in a native Objective-C/Swift app.

I know that there's a possibility to work with Unity/Cocos3D but then the entire app will have to be Unity/Cocos3D based. In my case the app has to be native and only one screen (one of the tabs in the tab bar controller) should integrate the 3D model that the user can move/rotate etc.

Thanks.

Answer

cyrille picture cyrille · Jun 6, 2016

The FBX SDK is available on iOS and I wrote a little tutorial to demo how to use it here. However, the FBX SDK does contain a viewport/canvas for displaying FBX file on any OS. For displaying FBX you would need to create your own view. There is couple of solutions you can use here:

  1. without programming, you can use the 'FBX Review'. This tools is free and designed to display FBX, DAE, OBJ, ... files
  2. you can implement your own viewport/view such as an obj view like I did here, but it would probably need to be rewritten. I wrote it overnight for a hack, so it needs to be optimized.
  3. you use the iOS SceneKit library which would be a better approach than implementing your own view.