When trying to import a Skeletal Mesh from USD via the Interchange Framework, I cannot get Unreal to properly merge the material slots as desired. There is an option called keep_sections_separate in the DefaultAssetsPipeline, and this will create a material slot per usd Mesh beneath the SkelRoot if set to True. If I set it to False I will only ever end up with a single material slot. I cannot figure out how to change this behavior. My understanding of how material slot merging on import works is that any meshes bound to the same material will be merged into a single material slot. Therefore, I have made dummy materials in USD and bound them to Mesh prims the way I want them grouped. However, this does not appear to be working.
The importer always creates a “!DisplayColor_0_0” slot and sets it to a DisplayColor material. It creates my dummy materials but those don’t get assigned to anything.
What am I missing here?
[Attachment Removed]
Steps to Reproduce
Import a USD file with meshes under a SkelRoot and bound to a Skel. Bind materials to some of the meshes so that they share a material. Import via Interchange Framework making sure that keep_sections_separate is False. You will only get one material slot.
Try again with keep_sections_seperate True and you will get a slot for every single Mesh.
[Attachment Removed]
Hi Christopher,
My apologies for the late reply.
There may be different causes of the issue you are experiencing.
Could you share a USD file illustrating your issue please?
Thanks for your patience,
Jean-Luc
[Attachment Removed]
Hi Christopher, it would also be interesting to know if you get the same result with the Human Female USD example:
https://openusd.org/release/dl\_usdskel\_examples.html
It should import something like the following:
[Image Removed]
Also, is the import generating all the expected materials but not creating slots and assigning them? Or not generating materials at all? The use of the display color material might suggest that the import isn’t finding materials.
Thanks
Antony
[Attachment Removed]
The materials were just dummies to force the slots to merge as desired so them being imported wasn’t the issue. It did more testing with 5.8 and this seems to work as expected there, so I guess this is just a pre-5.8 problem.
[Attachment Removed]