1
$\begingroup$
  1. How do I keyframe an object assigned material slot?
  2. How do I keyframe material linked to a material slot? (In the Browse Materials to be linked button just below the materials slots.)
$\endgroup$
3
  • 1
    $\begingroup$ You could do it by code, but I bet, there is an easier way to do, what you want without keyframing object's active material. Give some hint on what you're final goal is. $\endgroup$ – Mzidare Oct 14 '16 at 7:56
  • $\begingroup$ i want to make animation of an object changing diffuse, emit, transparency, etc. i know these values perhaps could be keyframed, but the point is i have many objects sharing the same material, so changing these values would change all of them. so i wanted another material having fixed values to switch certain objects to it. $\endgroup$ – user8844 Oct 14 '16 at 8:31
  • $\begingroup$ How about duplicating the material for the object that you want to animate, by clicking on the number next to the material name?Then you will have new material with the same settings and you can animate all you want without changing settings in the materials of other objects. $\endgroup$ – Mzidare Oct 14 '16 at 8:35
1
$\begingroup$

Mixing/Switching Material in the node editor is probably the best solution for you.

  1. Create two distinct materials. We will switch/fade between these two.
  2. Create a third material: "mix". Activate nodes for this material (marked red).
    materials with node
  3. In the node editor, create one material node with the first material and one with the second material. Connect them to a MixRGB node.
    mixed materials internal node
  4. You can animate the material influence with the Factor slider of the MixRGB node in the third material.
    enter image description here

After keyframing the Mix node, they keys will show up in the dopesheet.
enter image description here

  • You can still assign the first two materials to other objects.
  • You can add more mix nodes in the "mix" material to switch between more materials.
  • The material keyframes don't update in the viewport, but will render correctly.

$\endgroup$
2
  • $\begingroup$ i followed your steps exactly, and got the same results as yours, but when i insert keyframes for Factor, i get no keyframes in the timeline or graph editor, and there is no animation playable in the viewport $\endgroup$ – user8844 Nov 27 '16 at 8:54
  • $\begingroup$ I updated the answer, you probably did everything correct. The blend file is now attached. The material keyframes don't update in the viewport, but will render correctly. Afaik this is a limitation in Blender. $\endgroup$ – Leander Dec 4 '16 at 9:22

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.