What is the easiest way to convert .obj or .stl to .usdz?

北城以北 提交于 2020-05-26 04:59:41

问题


Apple AR Quick Look apparently only supports .usdz files. So, what is the easiest way to convert an .obj or .stl to .usdz?

I googled this first but the most popular result was to use a free tool called Vectary, but when I actually tried to use it, it wasn’t free.

Thanks.


回答1:


With iOS 13 & Reality Kit, Apple has released a USDZ converter that does not require Xcode; the converter is a Python based tool. I have been using it the last few days to convert various files gltf, obj files.

Download link:

https://developer.apple.com/download/more/?=USDPython

Example usage:

usdzconvert someobject.obj  

You will want to edit paths for your environment variables.

Or double click the file which is in the top level of the folder:

USD.command

to launch a shell with the environment variables set.

And within Xcode 11, you can export SCN files to USDZ files.

It is well worth watching the WWDC 2019 video; it is just over 30 minutes:

https://developer.apple.com/videos/play/wwdc2019/602/




回答2:


If you're using Xcode 11, you can utilise the following command in Terminal:

usdzconvert ~/Desktop/file.obj

usdzconvert command is a Python script that converts .obj, .gltf, .fbx, .abc, and .usda/.usdc/.usd assets to usdz.

However, if you wanna use this command in Terminal, you need to download usdz Tools from HERE.

In case you're using Xcode 10, type the following command in Terminal:

xcrun usdz_converter ~/Desktop/file.obj ~/Desktop/file.usdz

For further details look at THIS POST and THIS POST.




回答3:


If you're using Xcode, this is the easiest solution

Open the file in Xcode, then go to File > Export... and choose the file type (.usdz is 'Universal Scene Description (Mobile)'):

Exporting as <code>.usdz</code>




回答4:


Apple released a tool called Reality Converter that has an interface which allows you to convert your .obj, .gltf and .usd files into .usdz

Check it out: https://developer.apple.com/news/?id=01132020a



来源:https://stackoverflow.com/questions/57940320/what-is-the-easiest-way-to-convert-obj-or-stl-to-usdz

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!