How to create a USDZ file?

2020-02-17 09:23发布

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?

标签: 3d 3d-model usdz
8条回答
Rolldiameter
2楼-- · 2020-02-17 10:02

You can create usdz files online in a tool called Vectary:

  1. Open Vectary editor.

  2. Create your 3D model or import your 3D file with drag and drop (OBJ, STL, GLTF, DAE).

  3. Export as USDZ 3D file in the right panel.

  4. You will receive an email with a link to download your USDZ file.

More info on the url below:
https://www.vectary.com/3d-modeling-how-to/how-to-create-usdz-file-for-ar-online/

You don't need to rewrite the names of the object or materials, the tool does all the work.

查看更多
【Aperson】
3楼-- · 2020-02-17 10:05

We use an application called SimLab Composer. You can open all of the leading 3D files formats, then you can export them to USDZ files directly.
We also use the free materials library they provide, it can give a great appearance for the models.

Download from here: https://simlab-soft.com/3d-plugins/usdz_plugins.aspx

查看更多
聊天终结者
4楼-- · 2020-02-17 10:15

You can now create usdz files in SketchUp Pro using a prebuilt plugin.

  1. Download usdz plugin from https://github.com/drwave/usd-sketchup/blob/master/USDExporter.plugin.zip

  2. Unzip file, and place USDExporter.plugin in Plugins directory inside the SketchUp Pro app bundle. You can do this from Terminal by the following. Note you will need to type an admin password, as the directory is probably write-protected

    Sudo cp -rf USDExporter.plugin /Applications/SketchUp\ 2018/SketchUp.app/Contents/Plugins/

查看更多
我想做一个坏孩纸
6楼-- · 2020-02-17 10:21

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/

查看更多
做自己的国王
7楼-- · 2020-02-17 10:22

For creating USDZ files from OBJs on iOS (no xcode needed)

An engineer on my team figured this out last week! (see his rundown on our blog: https://www.scandy.co/blog/how-to-export-simple-3d-objects-as-usdz-on-ios)

Creating USDZ files is funny right now - currently we can fake it by saving a USDC file and... renaming the extension!

First you'll want to load the .obj file at filePath as an MDLAsset

NSURL *url = [NSURL fileURLWithPath:filePath];
MDLAsset *asset = [[MDLAsset alloc]initWithURL:url];

ensure the MDLAsset can write the desired extensions usdc is supported (USD binary format)

if([MDLAsset canExportFileExtension:@"usdc"]){
  NSLog(@"able to export as usdc");

  // save the usdc file
  [asset exportAssetToURL:usdcUrl];
}

rename the usdc to usdz because that's all it takes

NSError *renameErr;
NSFileManager *fm = [[NSFileManager alloc] init];
BOOL mvResult = [fm moveItemAtPath:usdcPath toPath:usdzPath error:& renameErr];
if(! mvResult){
  NSLog(@"Error renaming usdz file: %@", [renameErr localizedDescription]);
}

Hope this helps until Apple can give us a more thorough how-to.

查看更多
登录 后发表回答