I have open a scene started in H20.5 in H21, and few things seems to doesn't work anymore, or the same way.
I have a prim attribute "usdmaterialpath" set for the material and used the option "bind material based on imported attribute", the sublayer style was set on the default value "add SOP layer as new sublayer" in H20.5, and it was working fine (in H20.5).
But now in H21 the material are not bound, I need to change the sublayer style to "merge SOP layer into existing active layer" or "copy SOP layer into new active layer" to have the material bound, but in this case I have some errors in the console.
What is the issue exactly, and is there a better (more efficient) way to do it ?
Without a hip file I can't see what your SOP Import is doing. But a common issue popping up in Houdini 21 was caused by an update to the USD library. If the prim with the material:binding relationship doesn't apply the "MaterialBindingAPI" schema, the binding attribute is ignored. You must be sure to also apply this API schema so that USD will look for the binding attribute.
It's also possible this is not your problem, in which case please post a simple hip file (or submit a bug with a hip file if you don't want to post a file to the forum).
Thanks for your answer, I'm pretty sure my USD/LOP workflow is not 100% "correct", and could be one of the cause of the issue.
I've clean the file a little to remove some unnecessary part. The "merge SOP" or "Copy SOP" option works, so I can still render my scene using this, but I would like to understand the reason why it was working in H20.5 and not in H21, to learn more on LOP.
I don't think I'm seeing what you're seeing. Have you tried the latest daily build of Houdini 21?
It's hard for me to say for sure, because I don't have any textures, but just looking at the USD scene, it seems like the material binding is working fine regardless of the SOP Import "sublayer style"... I don't think there is anything wrong with your setup, FWIW. So if it's not working with the latest daily build, please submit a bug. Thanks!
I'm using Houdini 21.0.440. I forgot to remove the texture before posting the file, but you can replace it with a standard surface with a random color to test.
I will fix the scene and submit a bug, thanks for your help.