将 ( .obj/.fbx ) 转换为必须支持 iOS SceneKit 的 .dae 运行时 [英] Convert ( .obj / .fbx ) to .dae runtime which must support iOS SceneKit

查看:124
本文介绍了将 ( .obj/.fbx ) 转换为必须支持 iOS SceneKit 的 .dae 运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难找到在后台自动将 .obj/.fbx 转换为 .dae(支持 iOS 场景适配)的方法.

I am facing trouble to find a way to convert .obj / .fbx to .dae (iOS scenefit Supported) automatically in background.

在 python 中,可以将文件从 .obj/.fbx 转换为 .dae 文件格式.这个过程应该在后台运行,我们会在服务器上得到 .obj/.fbx 文件后立即运行.

In python, it may be available to convert the file from .obj / .fbx to .dae file format. This process should run in background, immediately run after we will get .obj / .fbx file on server.

这是我们正在尝试转换的示例文件.

Here is the sample file, which we are trying to convert.

https://s3.ap-south-1.amazonaws.com/p9-platform/DAE/barware_s11624.obj

如果您有任何建议,请帮助我.

Please help me, if you have any suggestion.

推荐答案

我会推荐使用 Assimp 或 AssimpKit(我只使用前者,但后者可能是一个更容易的起点).

I would second the recommendation for using Assimp or AssimpKit (I’ve only used the former but the latter might be an easier starting point).

我相信 iOS 上的 DAE 根本不是 DAE,它们只是保留了相同的后缀,实际文件是 SceneKit 档案.我不确定编写它们的 API 是否已经公开,但我认为现在可能是因为 Xcode 现在愿意加载 DAE 并写出 SceneKit 档案(但它添加了.scn"后缀,而不是.dae"").

I believe the DAEs on iOS aren’t DAEs at all, they just left the suffix the same and the actual files are SceneKit archives. I’m not sure if the API to write them is exposed yet, but I think it might be now since Xcode is now willing to load DAEs and write out SceneKit archives (but it adds the ".scn" suffix, not ".dae").

iOS SceneKit 有可能只加载.scn"文件——它不会加载真正的 DAE,因为 DEA 读/写框架是从索尼获得许可的,而且是巨大的,而 iOS 团队只是不想要那个巨人其系统上的丑陋框架.

It’s possible that iOS SceneKit can just load ".scn" files — it won’t load true DAEs because the DEA-reading/writing framework was licensed from Sony and is HUGE and the iOS team just doesn’t want that giant ugly framework on its system.

另一种选择是将 iOS 应用程序与 Assimp 相关联——它可以本地加载大量格式,因此您可以跳过所有中间内容.它几乎没有 Sony 的 DAE 库那么大,因此可以将它与您的应用一起提供.

Another option would be to just link the iOS app against Assimp — it can load a ton of formats natively so you could skip all the intermediate stuff. It’s not NEARLY as huge as Sony’s DAE library so it might be acceptable to ship it with your app.

这篇关于将 ( .obj/.fbx ) 转换为必须支持 iOS SceneKit 的 .dae 运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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