0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ You can insert keyframe for the Mix factor, if you move the mouse cursor above the slider and hit "i". After you can manage it in the dopesheet, or in the graph editor. $\endgroup$ – FFeller Apr 2 at 5:53
0
$\begingroup$

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.

enter image description here

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.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.