2
$\begingroup$

I'm trying to figure out how I can keyframe a texture change. With three of my animations, it uses a default texture of the character smiling. For the Attack animation, my texture is the character showing his teeth in an angry way. Older guides I've come across suggest keyframing the textures. This doesn't appear to be an option anymore? Another one showed a Node setup where there was a Mix/Mix Factor, which again, is no longer available. It's just Mix Shader. If I can't keyframe textures changing, what setup could I use with the Nodes? Or is there an even simpler method available?

Thanks

$\endgroup$
1
  • 2
    $\begingroup$ Setup a material with two Shaders and Mix Shader then hover over the Factor value in the Mix Shader and hit "i" this will create a key frame. Just set your keyframe to 0.0. or 1.0 depending on which Material you want to appear at that time. Can be extended with a "tree" of Shaders and Mix Shaders. $\endgroup$
    – rob
    Commented Apr 30, 2019 at 11:36

1 Answer 1

5
$\begingroup$

There are multiple options:

  • you can animate the nodes in the material itself to mix multiple textures (animate factor of Color > Mix node):

    enter image description here

  • put all your textures into a single image (image atlas). Then you can use the UV Warp modifier to translate the UV coordinates across the image atlas.

    To control the modifier:

    • create an armature rig and animate the bone positions (as shown in this UV Warp tutorial)
    • create an integer custom property and use it to drive the bone/empty location in single axis. The image atlas should be an image strip with equally spaced images in this case. Then you keyframe the integer property that switches all the textures.
$\endgroup$
3
  • $\begingroup$ Awesome. I've got that setup correctly at least. However, whenever I press 'i' on the Roughness, no keyframe is being added in the Dopesheet or the Timeline. $\endgroup$ Commented Apr 30, 2019 at 13:14
  • 1
    $\begingroup$ @DustyShinigami You need to have that node selected so it shows in the Dopesheet I think. $\endgroup$ Commented Apr 30, 2019 at 15:44
  • $\begingroup$ That certainly adds a keyframe to the Timeline, but it isn't showing up in the Dopesheet, I'm afraid. Also, the whole method isn't working or ideal for what I'm trying to do. I can't set the texture to one thing for an animation strip and then set it to another for a different strip. :-\ $\endgroup$ Commented Apr 30, 2019 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .