MDLAsset export to .usdc/.usda loses materials

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

Replies

I've submitted bug report # 42575291

any luck with this?

No any reaction from Model I/O team 😟

any word? we have tried to contact a few people at apple directly but no luck --

the same 😟

Any luck guys? I'm having the same issue!

The problem is still there.

I tested on the latest iOS 13 beta 6. ModelIO still doesn't export MDLMaterial's to usdc/usda files.

Still not working as of latest iOS 13.2