Loading ShapeNet USD models with material throws error

Hello, I tried to modify the example of the synthetic dataset generation to load shapenet usd models with materials. To obtain these models I followed the example with the material flag on and it seems to work. But when I try to load these material models into the example (Synthetic Data Generation Samples — Omniverse Robotics documentation), I get the following error message (not the complete messge, but basically it is the same for the other materials):

2021-05-12 10:42:43 [15,645ms] [Warning] [omni.usd] inputs:opacity_constant already exists but type is mismatched. Removing old type (int) and creating new one (float)
2021-05-12 10:42:43 [15,645ms] [Warning] [omni.usd] Coding Error: in _SetValueImpl at line 5716 of /opt/buildagent-share/work/da639afa0455b478/USD/pxr/usd/lib/usd/stage.cpp -- Type mismatch for </World/Asset/mesh0/Looks/material_21_5_8/material_21_5_8.inputs:opacity_constant>: expected 'int', got 'float'

2021-05-12 10:42:43 [15,645ms] [Error] [omni.client.plugin]  Main: usd_plugin: Type mismatch for </World/Asset/mesh0/Looks/material_21_5_8/material_21_5_8.inputs:opacity_constant>: expected 'int', got 'float'
2021-05-12 10:42:43 [15,647ms] [Warning] [omni.usd] inputs:diffuse_color_constant already exists but type is mismatched. Removing old type (SdfAssetPath) and creating new one (GfVec3f)
2021-05-12 10:42:43 [15,647ms] [Warning] [omni.usd] Coding Error: in _SetValueImpl at line 5716 of /opt/buildagent-share/work/da639afa0455b478/USD/pxr/usd/lib/usd/stage.cpp -- Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:diffuse_color_constant>: expected 'SdfAssetPath', got 'GfVec3f'

2021-05-12 10:42:43 [15,647ms] [Error] [omni.client.plugin]  Main: usd_plugin: Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:diffuse_color_constant>: expected 'SdfAssetPath', got 'GfVec3f'
2021-05-12 10:42:43 [15,650ms] [Warning] [omni.usd] inputs:emissive_color already exists but type is mismatched. Removing old type (SdfAssetPath) and creating new one (GfVec3f)
2021-05-12 10:42:43 [15,650ms] [Warning] [omni.usd] Coding Error: in _SetValueImpl at line 5716 of /opt/buildagent-share/work/da639afa0455b478/USD/pxr/usd/lib/usd/stage.cpp -- Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:emissive_color>: expected 'SdfAssetPath', got 'GfVec3f'

2021-05-12 10:42:43 [15,650ms] [Error] [omni.client.plugin]  Main: usd_plugin: Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:emissive_color>: expected 'SdfAssetPath', got 'GfVec3f'
2021-05-12 10:42:43 [15,650ms] [Warning] [omni.usd] inputs:opacity_constant already exists but type is mismatched. Removing old type (int) and creating new one (float)
2021-05-12 10:42:43 [15,650ms] [Warning] [omni.usd] Coding Error: in _SetValueImpl at line 5716 of /opt/buildagent-share/work/da639afa0455b478/USD/pxr/usd/lib/usd/stage.cpp -- Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:opacity_constant>: expected 'int', got 'float'

2021-05-12 10:42:43 [15,650ms] [Error] [omni.client.plugin]  Main: usd_plugin: Type mismatch for </World/Asset/mesh0/Looks/material_30_4_8/material_30_4_8.inputs:opacity_constant>: expected 'int', got 'float'
2021-05-12 10:42:43 [15,904ms] [Error] [omni.syntheticdata.plugin] instanceList is null.
2021-05-12 10:42:43 [15,905ms] [Error] [omni.syntheticdata.plugin] instanceList is null.

I still get a rendered image. So what should I do with these messages, did it work out or not? I am also wondering where the color information went? It seems to be possible to import shape net models with color by using the extension (ShapeNet — Omniverse Extensions documentation).

Looks to me like a bug caused by a schema upgrade or mis-version. Material parameters are being defined multiple times with different types, causing all sorts of confusion. I’ll pass this to the attention of an expert. Might not be worth fixing in this old version, we have a new release coming up in a couple of weeks and we’ll make sure this works.

–Mike

Thanks for the reply! Considering the ShapeNet models I have encountered another problem when creating collision meshes for them. Here it often says that not enough points for the collision mesh are available. When I run into that error again, I will edit this post. This bug might be related, too. I ran into this error with material models and without material models of shapenet. @MikePhysX

I will take a look at this for the next release. It looks like it does do correcting of the type automatically because you still get color. If you are able to include id numbers for the models (should be in the output window when model is loaded) then I can test your specific case. Otherwise, I will try to find one that throws the error.