Open Ayaoayao opened 1 year ago
You are correct that internal references should not be triggering that warning, nor causing flattening. But more importantly, I don't think Apple devices have needed any of those "arkit" restrictions for years. I will folllow up with @dgovil and others at Apple to see if they can contribute precise updates to the USDZ creation utilities. But in the meantime, I think you should get good results using the "normal" UsdUtilsCreateNewUsdzPackage
, as long as you follow the USDZ specification in selection of textures, etc.
Yeah the arkit restrictions of yore should no longer be needed as long as all the references resolve properly within the USDZ. I'd recommend looking at https://developer.apple.com/documentation/realitykit/validating-usd-files?changes=_3 to see what USD features are supported. Unsupported features would just not be represented on load, but should not block a load.
Variants are a good example, where you can't modify them but the default variant will load fine. Effectively you'd get a flattened view of the stage on import.
UsdUtilsCreateNewUsdzPackage should do the trick as long as the resulting USDZ is self contained
Many thanks for your feedback, I will give the UsdUtilsCreateNewUsdzPackage
a try!
Filed as internal issue #USD-7718
Description of Issue
I converted a file to USD with various extensions.
The file was successful with the usda format but I didn't get the luck when converting it into usdz format.
The conversion raised a warning,
Warning: in UsdUtilsCreateNewARKitUsdzPackage at line 1240 of D:\***\Tools\USD\pxr\usd\usdUtils\dependencies.cpp -- The given asset 'C:\Users\****\Desktop\Top.usdc' contains one or more composition arcs referencing external USD files. Flattening it to a single .usdc file before packaging. This will result in loss of features such as variantSets and all asset references to be absolutized.
However, in my code, I used
UsdReferences::AddInternalReference
.The expected result would be, that the MeshPrimDef is referred.
Manually converting the usdz to usda with
usdcat
shows the final file is more like a monolithic oneSystem Information (OS, Hardware)
Edition Windows 10 Enterprise Version 21H2 OS build 19044.2006
Package Versions
v22.08
Build Flags
['--no-python', '--no-imaging', '--build-monolithic']