哪种格式的 3d 模型 SceneKit/ARKit 文件更适合使用 [英] Which format file for 3d model SceneKit/ARKit better to use

查看:59
本文介绍了哪种格式的 3d 模型 SceneKit/ARKit 文件更适合使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了一些如何在 SceneKit/ARKit 应用程序中放置 3d 对象的教程,并且所有这些教程都使用 .scn 格式的对象文件.

I read several tutorials how to place 3d objects in SceneKit/ARKit applications and all of them uses .scn format files for the objects.

但我发现如果我使用原始 .dae 格式并且不将其转换为 .scn 格式,则没有任何问题.

But I found there is no any issues if I use original .dae format and do not convert it to .scn format.

我真的看不出 .dae 和 .scn 格式之间有什么区别.

I don't really see any difference between .dae and .scn formats.

实际上结果在我看来是一样的,但你能解释一下它们之间的区别以及我应该在什么情况下使用吗?

Actually result seems to me the same but can you explain what the difference between them and what I should use in what cases?

谢谢!

推荐答案

DAE(数字资产交换,又名 Collada)是一种供应商中立的 3D 资产格式.它支持多种 3D 创作和演示工具中存在的广泛功能,但不是 SceneKit 中的所有可能的功能.从历史上看,它是 SceneKit 早期版本的唯一资产格式.

DAE (Digital Asset Exchange, aka Collada) is a vendor-neutral format for 3D assets. It supports a wide range of features that exist in multiple 3D authoring and presentation tools, but not every possible feature in SceneKit. Historically, it was the only asset format for early versions of SceneKit.

SCN 格式是 SceneKit 对象图的序列化.(有在 SCNScene 上读/写它的便利方法,但实际上这与通过将 SCNScene 传递给 NSKeyedArchiver/NSKeyedUnarchiver.)因此,根据定义,它支持 SceneKit 的所有功能,包括物理、约束、动作、基于物理的相机和着色器修改器.

SCN format is a serialization of the SceneKit object graph. (There are convenience methods for reading/writing it on SCNScene, but really it's the same thing you get by passing an SCNScene to NSKeyedArchiver/NSKeyedUnarchiver.) Thus, it by definition supports all features of SceneKit, including physics, constraints, actions, physically based cameras, and shader modifiers.

如果您正在使用 DAE 资产,部署到 iOS(或 tvOS 或 watchOS),并且与使用 SCN 资产没有任何区别,可能有两个原因:

If you're using DAE assets, deploying to iOS (or tvOS or watchOS), and not seeing any difference vs using SCN assets, there are two possible reasons:

  • 您的资产仅使用那些以 DAE 格式提供的 SceneKit 功能.
  • 在部署到 iOS/tvOS/watchOS 时,Xcode(通过 scntool)自动将所有 3D 资产资源转换为 SCN 格式.(并应用其他转换,例如交错几何缓冲区,以在 iOS/tvOS/watchOS 设备上获得最佳渲染性能.)构建的应用程序资源目录中的文件名仍然具有 .dae 扩展名,但文件内容与 SCN 格式相同.

  • Your assets use only those SceneKit features that are available in DAE format.
  • When deploying to iOS/tvOS/watchOS, Xcode (via scntool) automatically converts all 3D asset resources to SCN format. (And applies other transformations, like interleaving geometry buffers, for optimal rendering performance on iOS/tvOS/watchOS devices.) The filename in the built app's Resources directory still has a .dae extension, but the file contents are the same as SCN format.

(在iOS/tvOS/watchOS中运行的SceneKit实际上无法读取DAE,因此它依赖于Xcode的预处理.)

(SceneKit running in iOS/tvOS/watchOS actually can't read DAE, so it relies on this preprocessing by Xcode.)

这篇关于哪种格式的 3d 模型 SceneKit/ARKit 文件更适合使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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