Deepwell Posted October 5, 2021 Share Posted October 5, 2021 (edited) Hi all! I'm trying to create a layer material and it works fine so far - using it in a mix works as expected. But when I try to use attributes, e.g. the rest position, the binding fails as soon as I use the material as a layer. When I use it directly (assigned it directly to a geo) the binding works fine. And when I use it as a layer (and assign the layer mix to the geo) every other aspect also works fine - just the rest position suddenly is not known anymore (although the geo has not changed and still has the rest pos of course). Attached is a sample scene. The custom shader ("myshader") has a parameter "use_rest". With that you can switch it from using the usual P to using the rest position instead. You can assign the "myshader" material directly to the sphere (everything works fine with both, P and rest) or assign the "layermix" to it (only works with P but not rest). Any ideas? Regards Johannes layered_shader_rest_pos.hiplc Edited October 6, 2021 by Deepwell Quote Link to comment Share on other sites More sharing options...
Deepwell Posted October 10, 2021 Author Share Posted October 10, 2021 (edited) JFYI: I received input on the SideFX forum: It turns out that to make the bindings also work in layer mode you have to add them as a parameter with "Has Corresponding Connector" active and the "Invisible" also. See screenshot. Then the binding will also work when using the material not directly but as input to a layer mix. (PS: I mixed up two topics before and put the answer to a different question here - hence the edit...) Edited October 12, 2021 by Deepwell 1 Quote Link to comment Share on other sites More sharing options...
Deepwell Posted October 12, 2021 Author Share Posted October 12, 2021 Attach the corrected scene with a working rest pos binding also in layer mode. layered_shader_rest_pos.hiplc 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.