How to create a USDZ file?

Suren Konathala picture Suren Konathala · Jun 4, 2018 · Viewed 28.9k times · Source

I tried to look at the main documentation at http://graphics.pixar.com/usd/docs/index.html and http://graphics.pixar.com/usd/docs/Usdz-File-Format-Specification.html but could not find the details to create a usdz file.

I can get some sample USD files from http://graphics.pixar.com/usd/downloads.html

How can we create one?

Answer

Clay picture Clay · Jun 12, 2018

A gallery of usdz files are provided by Apple at the url below

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

You need a device with iOS12 beta installed for the models to be viewable on your mobile device. Basically Apple uses Mime-types model/usd usdz and model/und.pixar.usd .usdz to identify them as AR viewable. You also need to do this via the safari browser... Chrome does not support the file format.

the html to list a thumbnail usdz file would be the following.

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

to create your own usdz files, Apple has bundled usdz_converter as part of Xcode 10. Its a command line tool for creating the usdz file from OBJ files, Single-frame Alembic (ABC) files, USD file (either .usda or usd.c)

the basic command line is

xcrun usdz_converter Wineglass.obj Wineglass.usdz  

usdz supports physically based renders, to achieve this you add images for each component of the PBR like so,

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

A good video to get you started on how to create usdz files, host on a webpage & create a quicklook in your own app

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