在 iOS 本机应用程序中使用带有 3D 模型的 FBX 文件 [英] Use FBX file with 3D model in iOS native app

查看:115
本文介绍了在 iOS 本机应用程序中使用带有 3D 模型的 FBX 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在原生 Objective-C/Swift 应用的其中一个屏幕上显示交互式 3D 模型(客户端提供很少的 FBX 文件).

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.

我知道有可能使用 Unity/Cocos3D,但是整个应用程序必须基于 Unity/Cocos3D.在我的情况下,应用程序必须是原生的,并且只有一个屏幕(标签栏控制器中的标签之一)应该集成用户可以移动/旋转等的 3D 模型.

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.

谢谢.

推荐答案

FBX SDK 在 iOS 上可用,我写了一个小教程来演示如何使用它这里.但是,FBX SDK 确实包含用于在任何操作系统上显示 FBX 文件的视口/画布.要显示 FBX,您需要创建自己的视图.您可以在此处使用几种解决方案:

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. 无需编程,您就可以使用'FBX Review'.该工具是免费的,旨在显示 FBX、DAE、OBJ 等文件
  2. 您可以像我一样实现自己的视口/视图,例如 obj 视图 此处,但它可能需要重写.我连夜写了一个 hack,所以它需要优化.
  3. 您使用 iOS SceneKit 库是比实施您自己的观点更好的方法.
  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.

这篇关于在 iOS 本机应用程序中使用带有 3D 模型的 FBX 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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