首页 > 解决方案 > 如何创建 USDZ 文件?

问题描述

我试图查看http://graphics.pixar.com/usd/docs/index.htmlhttp://graphics.pixar.com/usd/docs/Usdz-File-Format-Specification.html的主要文档但找不到创建usdz文件的详细信息。

我可以从http://graphics.pixar.com/usd/downloads.html获得一些示例美元文件

我们怎样才能创造一个?

标签: 3d3d-modelusdz

解决方案


Apple 在下面的 url 提供了一个 usdz 文件库

https://developer.apple.com/arkit/gallery/

您需要安装了 iOS12 测试版的设备才能在您的移动设备上查看模型。基本上,Apple 使用 Mime 类型 model/usd usdz 和 model/und.pixar.usd .usdz 将它们识别为 AR 可视。您还需要通过 safari 浏览器执行此操作... Chrome 不支持该文件格式。

列出缩略图 usdz 文件的 html 如下。

<a rel="ar" href="model.usdz">
  <img src="model-preview.jpg">
</a>

为了创建您自己的 usdz 文件,Apple 将 usdz_converter 捆绑为 Xcode 10 的一部分。它是一个命令行工具,用于从 OBJ 文件、单帧 Alembic (ABC) 文件、USD 文件(.usda 或 usd.c )

基本命令行是

xcrun usdz_converter Wineglass.obj Wineglass.usdz  

usdz 支持基于物理的渲染,要实现这一点,您可以像这样为 PBR 的每个组件添加图像,

xcrun usdz_converter Wineglass.obj Wineglass.usdz 
-g WineGlassMesh
-color_map WineGlass_Albedo.png
-metallic_map WineGlass_Metallic.png
-roughness_map WineGlass_Roughness.png
-normal_map .  WineGlass_Normal.png
-emissive_map  WineGlass_Emissive.png

一个很好的视频,让您开始了解如何创建 usdz 文件、在网页上托管以及在您自己的应用程序中创建快速浏览

https://developer.apple.com/videos/play/wwdc2018/603/


推荐阅读