如何为 ARKit 将 dae 导入 SceneKit [英] How to import a dae to SceneKit for ARKit

查看:44
本文介绍了如何为 ARKit 将 dae 导入 SceneKit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行 Xcode 的 ARKit 项目模板,我可以按预期移动默认船.

If I run Xcode's ARKit project template, I can move around the default ship as expected.

我尝试导入一些我从 Blender 导出的 dae 模型,将船切换到新项目但保持代码相同.它们总是显示在视图中,但位于相机前面.如果我试图在模型周围移动,它会粘在相机前面并且不会停留在同一个虚拟空间中.

I have tried importing some dae models that I have exported from Blender, switching the ship to the new item but keeping the code the same. They always show in view but position in front the camera. If I try to move around the model it sticks infront of the camera and doesn't stay in the same virtual space.

我也试过从另一个教程导入一个 dae 并且按预期工作.

I have also tried importing a dae from another tutorial and that works as expected.

在将 3d 模型导出为 Collada dae 文件时是否需要进行任何设置以确保它会锚定到 ARKit 中的某个位置?

Does anything need setting when exporting a 3d model as a Collada dae file to make sure it will anchor to a position in ARKit?

推荐答案

在为 ARKit 导入 3D 模型时,请务必检查:

When importing 3D-models for ARKit make sure to check:

  • 文件的规模.一个单位等于 1 米
  • 模型应以坐标原点为中心,以便于定位模型

尝试在 Xcode 的 SceneKit 编辑器中导入文件并检查它是否正确导入.

Try to import the file in the SceneKit editor in Xcode and check if it gets imported correctly.

这篇关于如何为 ARKit 将 dae 导入 SceneKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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