Is there a way to override USD prims with Unreal Materials?

I am wondering if it is possible to override materials in USD prims of a USD Stage Actor with Material assets in Unreal?

1 Like

Did you come across a solve for this? Just jumping into USD now and am wondering the same. If I were to assign materials and bitmaps in Maya, is there a way to specify an Unreal material when opening a USD Stage Actor? With 100’s or 1000’s of objects, would be amazing to skip this step.

Does anyone have a solution to this?
Changing materials on the USD inside Unreal does not stick - if you close and reopen the scene then the new material assignments are lost.
It currently makes USD a bit unusable.

There’s a few ways to achieve that, and it will depend on your pipeline, your setup and your use case.

If you author your materials like this, they will be picked up by Unreal.

def Material "MyMaterial" ()
{
        "unreal_material" {
            token outputs:unreal:surface.connect = </MyMaterial/UnrealShader.outputs:out>

            def Shader "UnrealShader"
            {
                uniform token info:implementationSource = "sourceAsset"
                uniform asset info:sourceAsset = @/Game/Materials/YourMaterial@
                token outputs:out
            }

        }
}

Although I don’t remember the exact process, I remember I also achieved it by creating a new USD layer, assigning an already authored material, and then saving the changes on the USD layer (the USD Stage Editor).

Alternatively in the Unreal editor and export it as either USD or MDL. With this process, you’d have to compose the exported material back into your USD structure, but this way you have more control on how to do so. For instance, you could compose it as variant.

I learned all of this by working on an actual project, studying how USD works, and just trial and error. I recommend working on .usda files so that you can read how the USD files are being created, edited and composed onto the stage.

1 Like