Jump to content

Rest position in layered material

Recommended Posts

Posted (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?



Edited by Deepwell

Share this post

Link to post
Share on other sites


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 by Deepwell
  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now