Developer Notes

USD material overrides do not get applied properly to a USDStage prim inside UE.   

Description

USD material overrides do not get applied properly to a USDStage prim inside UE.    

When a material override that is set to a parent prim of USD Material, the override is ignored.   A usd material prim may have multiple sub-prims defining the material.    If the parent material has a property that matches one of the sub-prims properties - the sub-prim property wins and not the parent's.

The data is there, you can see it in the usd stage view window when you select the material, it's just not being applied.

 

Steps to Reproduce
  1. Place the solaris_override_2.usd, pink.png and green.png files all in the same directory.
  2. We need to modify the original usd file to fix the paths of the textures in the original.   Make a copy of the solaris_override_2.usd file.   Add a "_ORIG" suffix to the copy.
  3. Create a new project with an empty level
  4. Enable the USD Import plugin - Restart
  5. Create a USDStage and point it to the solaris_override_2_ORIG.usd file.
  6. Open the USDStage Window from the Window->Virtual Production->USD Stage menu option.
  7. Inspect the "inputs:file" property of the original materials.  Note the "collect1" material references "pink.png" and "collect11" references "green.png" .   Inspect their "usduvtexture1" prims under each material - note that both reference "pink.png"
  8. For testing, we will be removing the filepath of each "inputs:file" property.   Remove "Y:/Sandbox/davebr/HoudiniProjects/" from the "inputs:file" properties for collect1, collect11, and their corresponding usduvtexture1 prims.
  9. Save the USD Stage by selecting "File->Save" from the USD Stage Window.
  10. Reload the USD Stage ( "File->Reload" ).  The teapot should turn from gray to pink.   However, it should be green - as the "input:file" of the "collect11" material property points to "green.png".  This is the bug.

For further testing, you can make a copy of the solaris_override_2_ORIG.usd after modification to the "inputs:file" properties, and create a new USDStage Actor in UE.   Point it to your copy, and modify the "usduvtexture1" "inputs:file" path to point to "green.png" and reload the USDStage.   This time it should turn green.   Thus illustrating the "override" on the parent prim called "collect11" for the "inputs:file" is not being properly applied to the teapot.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-155387 in the post.

0
Login to Vote

Fixed
ComponentUE - Editor - Content Pipeline - USD
Affects Versions5.0.25.1
Target Fix5.1
Fix Commit22026397
Main Commit22033028
Release Commit22026397
CreatedMay 31, 2022
ResolvedSep 15, 2022
UpdatedSep 18, 2023
View Jira Issue