Hello!
I do export my scene to .usdc/.usda format. But all my attempts have failed.
It seems that MDLAsset loses materials assigned to MDLMeshes as well as all transformations assigned to MDLObject’s. Losing transformations is not a critical problem for me, because there is a solution to embed transformations into vertices. But I can not find any workaround for the problem of losing materials!
On 10.14 beta 4 MDLAsset even fails roundtrip test. Indeed, I experimented with Apple sample retrotv.usdz from https://developer.apple.com/arkit/gallery/ . If you rename retrotv.usdz to retrotv.zip and unpack it you’ll find retrotv.usdc file inside and MDLAsset fails the simplest roundtrip test:
MDLAsset* mAsset = [[MDLAsset alloc] initWithURL:[NSURL fileURLWithPath:@“/Users/dyunchik/Desktop/retrotv/RetroTV.usdc”]];
[mAsset exportAssetToURL:[NSURL fileURLWithPath:@“/Users/dyunchik/Desktop/retrotv/RetroTV.usda”]];
The resulted RetroTV.usda file will perfectly preserve all geometries, but skips all materials.
Does anybody know if it’s possible to export to usdc/usda and preserve MDLMaterial’s data? Maybe it is necessary to pay attentions to some specific MDLMaterialProperties? I use “diffuseColor”, “metallic” and “roughness” with appropriate semantics?
It would be helpful to know what Model I/O team thinks about this problem.
Regards,
Dmytro Yunchyk