问题
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?
回答1:
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/
回答2:
You can now easily create/export USDZ from Unity:
https://blogs.unity3d.com/2019/03/28/pixars-universal-scene-description-for-unity-out-in-preview/
回答3:
@Ash, you have to activate the command line tools in Xcode preferences, in case they're not actived yet (that was my case). See image below.
回答4:
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.
回答5:
A USDZ file are simply an unencrypted and uncompressed zip archive that can contain USD files with materials, textures, and animations and runs them directly with the USD run-time (on apple devices) without any need of unpacking.
USDZ
There are 3 Ways to create a USDZ file out of your designs :
1. Using Apple's USDZ Tools!
First method is to use apples python-based tools and their converter which takes some file formats and generates USDZ files from them. you can learn more about them and have them at Apple's website here: https://developer.apple.com/augmented-reality/quick-look/
2.Using Plugins and Converters.(Recommended)
Some companies have already took the lead of developing optimized software to create and convert a lot of file types to USDZ files and even optimize them, applying materials and and animations.
The best and most complete plugins for now are SimLab-Soft Plugins. Its a company known for creating plugins for all CAD programs and supporting a lot of file formats. you can export USDZ directly from Maya, 3DS, Revit, Sketchup, Rhino and more. It exports with solid and optimized quality for a better vr experience.
you can get their plugins from here: https://simlab-soft.com/3d-plugins/usdz_plugins.aspx
3. Using online converters.(FREE)
this method can be used for fast USDZ creation for preview purposes and you can't actually Reilly on for your professional work, but it's value that it's easy and free!
you can find this tool here: https://usdz.viewar.com/
回答6:
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
回答7:
You can create usdz files online in a tool called Vectary:
Open Vectary editor.
Create your 3D model or import your 3D file with drag and drop (OBJ, STL, GLTF, DAE).
Export as USDZ 3D file in the right panel.
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.
回答8:
You can now create usdz files in SketchUp Pro using a prebuilt plugin.
Download usdz plugin from https://github.com/drwave/usd-sketchup/blob/master/USDExporter.plugin.zip
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/
来源:https://stackoverflow.com/questions/50686813/how-to-create-a-usdz-file