Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a USDZ file?

Tags:

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?

like image 760
Suren Konathala Avatar asked Jun 04 '18 18:06

Suren Konathala


People also ask

How do I save a USDZ file?

Create a USDZ File From within an open Reality Composer project, choose the File menu > Export option. In the export sheet, choose whether to export the scene or project in USDZ format and click the Export button.

What is USDZ file format?

What Is the USDZ File Format? USDZ is a 3D file format that displays 3D and AR content on iOS devices without having to download special apps. Users can easily share this portable format, and developers can exchange it between applications in their 3D-creation pipeline.


1 Answers

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/

like image 103
Clay Avatar answered Oct 04 '22 01:10

Clay