-1

Shader Editor I want to animate a face texture after a character gets punched to change. I have 3 images. Here is the shader editor setup, I got the rig from someone else.

How would I do this?

Ac_Ham
  • 21
  • 4
  • There are plenty of suggestions on this site about texture animation. Odd that you just didn't search for "animate texture"! Find one where you can select one of three images based on a custom property setting (e.g. based on a "Punched Index"). I often use this to select a cloth pattern (e.g., "red or green underpants") – james_t Feb 20 '24 at 16:14
  • also check my answer here: https://blender.stackexchange.com/questions/181389/how-can-i-animate-a-2d-face-rig-on-any-3d-object – moonboots Feb 20 '24 at 16:30

1 Answers1

0

I'll leave you with my example of Shader nodes "image chooser" logic, here for hair texture (color) index based on a custom property. I use a custom property at the object level (instead of the suitable material level) because of some problems with linked library overrides.

First I create the custom property that will be an index for hair color:

enter image description here

Then as an input to the Diffuse color, I use a group node called HairColor:

enter image description here

Inside this I supply the various texture images (think: your face punch images!) to a Chooser group node :

enter image description here

Inside the chooser group node (Hair Color Chooser), I use Mix nodes. I first hover the mouse over the previously created custom property and right mouse click to the context menu, and select Copy as New Driver. In the Factor property I right mouse context Paste Driver, and then edit the driver expression (another context menu item), to add the logic so that I get a cascading binary selection (A or B selection of the images).

enter image description here

It is unfortunate that there is not a multi-choice node (instead of just Mix Node with A through B inputs), which would reduce labor.

Here is my example to explore:

james_t
  • 5,446
  • 8
  • 29