In the previous chapters, you explored the power of AR Quick Look. You also learned how to create your own AR experiences with Reality Composer using models from the built-in content library. But what about creating AR experiences with your own custom content?
The key technology behind AR Quick Look and Reality Composer is a file format known as USDZ.
In this chapter, you’ll learn about USD and the USDZ file format. You’ll also learn how to convert your own virtual content into this universal format using Python-based command-line tools. This knowledge will empower you to create your own USDZ content for both AR Quick Look and Reality Composer.
What is USD?
Before getting to USDZ, you need to understand the technology behind it: Universal Scene Description (USD). This is a universal format to exchange 3D content. Pixar developed it to improve the graphics and animation workflow pipeline of large-scale animation productions.
USD has been under development since 2016. It’s one of the core technologies behind stunning animation blockbusters like “Finding Dory” and “Cars”.
Since Pixar open-sourced the technology, it’s become an industry standard. Many of the big players within the 3D graphics and animation industry now back it.
USD comes with an onslaught of great features. Here’s a shortened list of just some of its key features:
What is USDZ?
At WWDC 2018, Apple introduced AR Quick Look along with the new USDZ file format. As you know by now, USD stands for Universal Scene Description; the added Z merely indicates that it’s a ZIP archive.
A number of critical features make USDZ an excellent choice for 3D content delivery:
At WWDC 2019, Apple announced a new set of tools to help developers create their own USDZ files. These tools are known as USDZ Tools or the USD Python Tools.
Installing USDZ tools
Your first step is to download the USDZ Tools: https://apple.co/36TN9WJ
Reviewing the project
For this example, you’ll use a cool AR drum set Reality Composer project. Open starter/ARDrumSet.rcproject in Reality Composer, then press the Play button to test it.
Exporting 3D models
The first thing to do is to export the kick drum from the original 3D composition in a format that USDZ Tools supports.
Converting 3D models to USDZ
It’s time to convert Kick.glb into a USDZ file. To do this, jump back to the open Terminal window from the first section and execute the following command-line instructions:
cd / cd Users/<YourUserName>/Desktop
For your next step, you’ll use the usdzconvert tool. To find out more about the available options, execute the following command-line instructions to request detailed help information:
usdzconvert Kick.glb -v Kick.usdz
Converting USDZ to USDA
To see what’s inside the USDZ file, you need to convert it to a USDA file, which is the plain text representation of the USDZ.
To do this, you’ll use usdcat. This tool converts USDZ into USDA files.
usdcat Kick.usdz -o Kick.usda
Inspecting and validating USDZ
Now that you’ve converted your 3D model into USDZ, you can inspect and validate the USDZ file.
To get a high-level overview of the model hierarchy, you’ll use the usdtree tool.
Finally, to validate the generated USDZ and to make sure the file is compliant, you’ll use the usdchecker tool.
usdchecker Kick.usdz -v
Importing USDZ assets
Now that your USDZ file is ready to go, open starter/ARDrumSet.rcproject again with Reality Composer.
Well done, you’ve just reached the end of this chapter.
Where to go from here?
Here are a few recommended links you can explore to advance your knowledge on this topic: