CesiumGS / cesium-omniverse

Bringing the 3D geospatial ecosystem to Omniverse
https://cesium.com/platform/cesium-for-omniverse/
Apache License 2.0
55 stars 7 forks source link

Custom materials aren't working in Kit 105.1.2 #635

Closed lilleyse closed 7 months ago

lilleyse commented 7 months ago

Based on some early debugging materialHasCesiumNodes can't find any connection attributes and so it doesn't try to apply styling. Sill investigating why the connection attributes aren't there.

105.1.2 on the left, 105.1 on the right

image

ferry-building-2.zip

lilleyse commented 7 months ago

After some more investigation, this seems to be an issue with Fabric material population.

When I create something in material graph and print the stage I see this:

Prim: /World/Looks/OmniPBR (12583425)
  Attributes:
    Attribute: outputs:mdl:volume
      Type: token
      Value: 
    Attribute: outputs:mdl:displacement
      Type: token
      Value: 
    Attribute: outputs:mdl:surface
      Type: token
      Value: 
    Attribute: outputs:mdl:volume
      Type: connection
      Value: Path: /World/Looks/OmniPBR/Shader, Attribute Name: out
    Attribute: outputs:mdl:displacement
      Type: connection
      Value: Path: /World/Looks/OmniPBR/Shader, Attribute Name: out
    Attribute: outputs:mdl:surface
      Type: connection
      Value: Path: /World/Looks/OmniPBR/Shader, Attribute Name: out
    Attribute: Material
      Type: tag (primTypeName)
    Attribute: UsdTyped
      Type: tag (ancestorPrimTypeName)
    Attribute: NodeGraph
      Type: tag (ancestorPrimTypeName)
    Attribute: TfType::_Root
      Type: tag (ancestorPrimTypeName)
    Attribute: UsdSchemaBase
      Type: tag (ancestorPrimTypeName)

However, when I save the project and reload the .usda I see this:

Prim: /World/Looks/OmniPBR (12584705)
  Attributes:
    Attribute: Material
      Type: tag (primTypeName)
    Attribute: NodeGraph
      Type: tag (ancestorPrimTypeName)
    Attribute: UsdSchemaBase
      Type: tag (ancestorPrimTypeName)
    Attribute: UsdTyped
      Type: tag (ancestorPrimTypeName)
    Attribute: TfType::_Root
      Type: tag (ancestorPrimTypeName)

The connection attributes are missing and this is causing problems for how we apply materials to tiles.

What this means is that we can create materials and assign them to tilesets in the same session, and that all works. But if we reload projects it doesn't work.

lilleyse commented 7 months ago

Accidental duplicate of https://github.com/CesiumGS/cesium-omniverse/issues/607