USD import - aoMap support?

Hi,

It seems aoMap is not properly handled when you import .usd, not sure if this was a bug or a not implemented feature so I thought I’d ask the forum first. Please let me know if this is more suitable for feature requests or bug reports.

Unfortunately, I can’t share the asset but I could share USD code snippets of material nodes that works and that not.

So for example, the inputs:emissiveColor node in the following material in .usd is imported correctly by blender and it produces proper shader node in blender:

def Material "JPWuURAYZptTggM"
{
    token outputs:surface.connect = </tracking_node_placeholder/Looks/JPWuURAYZptTggM/YEnKIwPtpiQtnCt.outputs:surface>

    def Shader "YEnKIwPtpiQtnCt"
    {
        uniform token info:id = "UsdPreviewSurface"
        color3f inputs:diffuseColor = (0, 0, 0)
        color3f inputs:emissiveColor.connect = </tracking_node_placeholder/Looks/JPWuURAYZptTggM/vFQNheUtEsyRLKf.outputs:rgb>
        float inputs:metallic = 0.85
        float inputs:roughness = 0.2
        token outputs:displacement
        token outputs:surface
    }

    def Shader "vFQNheUtEsyRLKf"
    {
        uniform token info:id = "UsdUVTexture"
        float4 inputs:fallback = (0.5, 0.5, 0.5, 1)
        asset inputs:file = @./0/GyYmtUyAzPVgajS.png@
        float2 inputs:st.connect = </tracking_node_placeholder/Looks/JPWuURAYZptTggM/vFQNheUtEsyRLKf/TexCoordReader.outputs:result>
        float3 outputs:rgb

        def Shader "TexCoordReader"
        {
            uniform token info:id = "UsdPrimvarReader_float2"
            token inputs:varname = "st"
            float2 outputs:result
        }
    }
}

Whereas, the following material has inputs:occlusion node and it isn’t imported by blender thus blender doesn’t produce aoMap node in shader:

def Material "fAgLLeyEMIIowve"
{
    token outputs:surface.connect = </tracking_node_placeholder/Looks/fAgLLeyEMIIowve/mPAEhjajDvmMqEu.outputs:surface>

    def Shader "mPAEhjajDvmMqEu"
    {
        uniform token info:id = "UsdPreviewSurface"
        color3f inputs:diffuseColor = (0, 0, 0)
        float inputs:occlusion.connect = </tracking_node_placeholder/Looks/fAgLLeyEMIIowve/VNPlQxWkTOPrPMR.outputs:r>
        float inputs:roughness = 1
        token outputs:displacement
        token outputs:surface
    }

    def Shader "VNPlQxWkTOPrPMR"
    {
        uniform token info:id = "UsdUVTexture"
        float4 inputs:fallback = (0.5, 0.5, 0.5, 1)
        asset inputs:file = @./0/bGnxnqSJyxiZfPi.png@
        float2 inputs:st.connect = </tracking_node_placeholder/Looks/fAgLLeyEMIIowve/VNPlQxWkTOPrPMR/TexCoordReader.outputs:result>
        float outputs:r
        float3 outputs:rgb

        def Shader "TexCoordReader"
        {
            uniform token info:id = "UsdPrimvarReader_float2"
            token inputs:varname = "st"
            float2 outputs:result
        }
    }
}

(Attached the screenshot in the comment, it seems I can embed only one media since I’m a new member. There are only Principled BSDF and Material Output in the shader node)

I’m working with blender 3.0.1 on intel mac, importing .usd with the bundle .usd import module.

Is this expected? Or should be reported as a bug?
If this is expected, is there any way to get around it to make the aoMap work? Any pointer would be appreciated. Thanks for reading.

Screenshot of fAgLLeyEMIIowve material.

Principled BSDF does not currently support AO maps, Cycles and Eevee will dynamically compute lighting instead of relying on pre-baked maps. This is not considered a bug.

Ahh okay makes sense. Thanks for your answer! @brecht

I’m fairly new to Blender so this might be a dumb question but would you mind me asking what would be the best practice to work with assets that has baked aoMaps in Blender?

For a context, I need to edit .usd that has aoMap and export it to .usd in Blender. In this case, aoMap will be lost unless you manually re-setup in the shader node, is this correct?

There’s no aoMap/occlusion support in either the USD importer or exporter, so there’s just no way to do that right now I think.

I see. Thanks for your answer. It seems .gltf importer and exporter support it so I might use .gltf instead for the time being but hopefully, it’ll be implemented for .usd as well soon :slight_smile: Thanks again for your answers!