Reputation: 341
Our USDZ file won't load on iPhone 7 with iOS 12. It works fine on my iPhone X and iPad Pro, both running iOS 12 Beta.
We've tried creating this using the terminal commands and get the following warning although we don't believe this is the issue.
Warning: in CreateMaterialBindings at line 59 of /BuildRoot/Library/Caches/com.apple.xbs/Sources/3DAssetTools/3DAssetTools-14207.2/external/ModelKit/extern/usd/pxr/usd/usdObj/translator.cpp -- OBJ mtl usemtl name has invalid name '15___Default', using default usemtl name: 'defaultShadeGroup0'
The screen on the iPhone 7 looks as such:
You can download the raw files here.
Upvotes: 3
Views: 1545
Reputation: 58043
You can't see your 3D model because you're using very bad naming convention for file
model2_$$usd_converter$$_.usdc
insideusdz
container. In macOS and iOS you have to avoid using$
in file names, because dollar sign is a special character.
Follow these two steps to unzip, rename and rezip your usdz
file.
mmtest.usdz
file)To unzip a
usdz
file in macOS Mojave use the following method:
.usdz
file to .zip
..zip
file using Archive_Utility.app
or RAR_Extractor.app
.JPG
and/or PNG
format.USDC
model ain't inverted.usdz
again)Make sure that Xcode 10.2 is installed.
To convert a content of unzipped folder (binary
usdc
file and its textures) tousdz
file format again, use the following command inTerminal.app
:
cd ~/Desktop/mmtest/
xcrun usdz_converter Model.usdc Model.usdz
-g SofaMesh
-color_map Diffuse.jpg
-roughness_map Roughness.png
-normal_map Normal.jpg
And here are a full list of options (type xcrun usdz_converter -h
in Terminal):
-g groupName [groupNames ...] Apply subsequent material properties to the named group(s).
-m materialName [materialNames ...] Apply subsequent material properties to the named material(s).
-h Display help.
-a Generate a .usda intermediate file. Default is .usdc.
-l Leave the intermediate .usd file in the source folder.
-v Verbose output.
-f filePath Read commands from a file.
-texCoordSet set The name of the texturemap coordinate set to use if multiple exist (no quotes).
-opacity o Floating point value 0.0...1.0
-color_default r g b a Floating point values 0.0...1.0
-normal_default r g b a Floating point values 0.0...1.0
-emissive_default r g b a Floating point values 0.0...1.0
-metallic_default r g b a Floating point values 0.0...1.0
-roughness_default r g b a Floating point values 0.0...1.0
-ao_default r g b a Floating point values 0.0...1.0
-color_map filePath
-normal_map filePath
-emissive_map filePath
-metallic_map filePath
-roughness_map filePath
-ao_map filePath
Now model works perfectly.
Upvotes: 1