TheFoundryVisionmongers / KatanaUsdPlugins

Katana USD Plugins Repo
Other
48 stars 20 forks source link

Read boolean material parameters and primvars #15

Open kenmcgaugh opened 3 years ago

kenmcgaugh commented 3 years ago

Hello,

It looks like boolean primvars and material parameters are skipped over completely by UsdIn (and pxrUsdIn). Would it be possible to have them cast to an integer upon import? Where this is causing an issue for me is that the Autodesk Standard Surface shader has the "thin_walled" parameter declared as a bool. But this parameter cannot be inspected from within katana as it is completely skipped over on import. The only option is to declare the parameter as an int within the USD file, breaking the spec for that shader.

Thanks. --Ken

kenmcgaugh commented 3 years ago

Sorry, I need to clarify the above a bit. While digging deeper into this I realised that UsdIn actually is casting boolean material parameters into integer values, but it is not for primvars. This makes it difficult to use a primvar to override a boolean shader parameter.

Attached is a repro showing both bool and int material parameters and bool and int primvars. The material parameters get expressed as attributes when imported into katana. However for the primvars only the integer one comes in with its value intact.

katana_bool_issue.zip

JamesPedFoundry commented 3 years ago

Hi Ken,

Thanks for raising the issue, and further thanks for providing a repro file! I've logged this ticket internally for us to investigate #446834.

I will keep this thread updated as to when this starts and the progress on it.

Cheers, James