I’m trying to get a workflow running through Omniverse into Unreal Engine and I’m running into some confusion with the connector and how it detects and distills MDL materials.
I’ve developed a connector that turns our scenes into .usd files but when it comes time to import scenes into UE4 using the connector my materials are failing to load in.
I have an example scene here with a bunch of different paint colors using the same mdl shader.
In my asset structure there is no top level ‘looks’ scope because everything is referenced/instanced - so all materials are contained in the part files. Seeing as we typically have many duplicated parts in our scenes we make extensive use of instancing. I had initially thought that it was the lack of a ‘looks’ scope on the top level of the scene that caused my mdls not to be detected, but that isn’t the case. Here is the scene in Create and the corresponding scene in UE4. Note the field circled in red containing the material location. Unreal makes no attempt to distill any mdls here and just loads in the geometry.
The strange behavior here is when I turn off instancing and override the mdl location in the shader (with the same exact file path) - UE4 then successfully detects that a material is present and imports/distills it into a UE4 material. All I did was press the ‘x’ button in the sourceAsset field of the shader, then press the folder button and locate it again - and the only noticeable difference is the addition of the ‘checkpoint’ field in the shader (which goes unused)
The two file paths are exactly the same, but the first was in my connector code as a string and appended as the material reference - whereas the second one here is what I get when I select the material on the server. Neither have any spaces:
…/…/Materials/nvidia/vMaterials/AEC/Paint/Flat.mdl <-This one doesn’t work
…/…/Materials/nvidia/vMaterials/AEC/Paint/Flat.mdl <-This one seems to work
I have also tried this with absolute file paths and was able to reproduce the same issue.
The one thing that’s apparent to me are those errors in the Create console window - ‘Failed to resolve usd asset identifier’
It’s strange that this is a create error but doesn’t result in any visible issue in the material loading in create, though I can’t help but feel it’s related to my issue
Here are the files for this project from my Nucleus Server - ‘Materials’ and ‘Projects’ need to be on the same filepath layer because of the relative filepaths in the usd file. All of the cubes in this demo should behave as I described.
UE4ServerFiles.zip (11.7 MB)
I feel like there’s something small and obvious that I’m missing - how can I get my materials to be detected and imported/distilled without having to edit the usd output of my connector?
Also my dome light appears to have stopped coming through even though it was working before - but I’m not really concerned about that.