python - No able to bind material located in another file in USDA - Stack Overflow

I am having issue while binding a material for a mesh when the material is not located in another file

I am having issue while binding a material for a mesh when the material is not located in another file

main.usda

#usda 1.0
(
    metersPerUnit = 1
    upAxis = Z
)

def Scene
{
     def "Materials"
     {
       def "MaterialA"{...}
       def "MaterialB"{...}
     }
     
     def Mesh "mesh_model" (
        prepend references = @mesh_model.usda@<Scene>
     ){...} 
}

mesh_model.usda

def "Scene"
{
     def Mesh "my_mesh_model"
     {
        faceVertexCounts=[]
        faceVertexIndices=[] 
        normals=[]

        def GeomSubset "GeomSubset0"
        {
           ...
           rel material:binding = </Scene/Materials/MaterialA>
        }

        def GeomSubset "GeomSubset0"
        {
           ...
           rel material:binding = </Scene/Materials/MaterialB>
        }

     }
}

In this example the model is correctly displayed in my scene, I can also see different group of GeomSubset but none of the material is applied. tried in omniverse and usdview also, is there any solution for me to apply a material that is not located in another file.

I tried to set both of my materials and mesh in the same file and it worked, but in my project i need both to be separated and the geomsubset should be with the mesh.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742313038a4420280.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信