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

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

问题描述

我阅读了一些教程,如何将3d对象放置在SceneKit/ARKit应用程序中,并且所有对象均使用.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(Digital Asset Exchange,又名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相同.)因此,根据定义,它支持 all 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设备上获得最佳渲染性能.)内置应用程序的Resources目录中的文件名仍然具有.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天全站免登陆