I have a Mix Shader mixing two textures and one shape key applied to an object.
I want to control the mix shader value from the shape key slider.
I think this is achievable by using drivers but i don't know how to do it.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityI have a Mix Shader mixing two textures and one shape key applied to an object.
I want to control the mix shader value from the shape key slider.
I think this is achievable by using drivers but i don't know how to do it.
Select the mesh, in the node editor right click hovering the mix Shader slider and choose "Add driver-manually create later". Then open a graph editor window and set it as "drivers" instead of "F-Curves". Select the Fac driver you created, open the "N" tab, choose "Drivers" tab, set all thoose options: Scripted expression, var, Type of var: single property, Type of single property: Key property.
Lastly hover on the shapekey slider, right click on it and choose "Copy data path", then in the driver tab click on the empty path field and press Ctrl V to paste.
Enjoy (consider that in some cases the driver is not updated in the viewport, like in "material" kind of visualisation, but it will work in rendered mode, and you can always click the "Update dependencies" button to have it work).
This is the complete driver in my setup, and an highlight of a common mistake you may be missing.