1
$\begingroup$

So I've been trying to animate 2D textures on a 3D mesh as in this tutorial.

It was made on Blender 2.79 and the differences are driving me crazy.

$\endgroup$
1
  • 2
    $\begingroup$ Please be more specific! The tools of Blender 2.79 and 2.8 are very similiar if not the same. At what part are you stuck or what tool are you looking for? $\endgroup$
    – Leander
    Jun 5, 2020 at 13:19

1 Answer 1

5
$\begingroup$

There are at least 4 solutions:

Texture Coordinate Object solution:

Create your facial expression on a transparent PNG, create an empty, use the Object output of the Texture Coordinate node and select the empty at the bottom of the Texture Coordinate in order to control the location of the image. In the Image Texture node, choose Clip instead of Repeat. You can parent the empty to a bone if you want to keyframe more easily:

enter image description here

enter image description here

UV Project modifier solution:

Create all the expressions on a trasparent image, create an empty, give your object a UV Project modifier with the empty as Object, use the UV output of the Texture Coordinate, move the empty to move the image on the surface. If you have another texture for the skin, simply create a second UV map and select it in a UV Map node, and select the first UV map in the modifier:

enter image description here

UV Warp solution:

  • Create a PNG, with transparent background, of your facial expressions:

enter image description here

  • Give your object a material. Assign another material to the face area: Unwrap this part, add a UV Map node with the new UV map loaded, plug it into an Image Texture node, open the PNG, plug the Image Texture into a Mix Shader, plug the Image Texture Alpha output into the Factor of the Mix Shader, plug the skin material into the other input of the Mix Shader.

enter image description here

  • Create an empty at the same position as the head. Give the head a UV Warp modifier. Choose X and Z as UV Axis, From > Choose the head object, To > Choose the empty.

enter image description here

  • Create a bone at the exact same position as the empty. Parent the empty to this bone (the bone will probably be part of a whole armature):

enter image description here

  • Now the bone controls the empty and the empty controls the position of the PNG. To save all the different expressions, you can use the Pose Library in the Properties panel > Object Data. Move the bone in Pose mode and press the "+" button to save the pose. Continue until you've saved all the poses. "+" button is also used to replace an existing pose. Use the Apply button to call a pose. Give each pose an appropriate name (Smile, Sad, etc...).

enter image description here

Image Sequence solution:

  • Create your facial expressions on transparent (alpha) backgrounds, name your images 0.png, 1.png, 2.png, etc:

enter image description here

  • Select the part of your mesh where the expressions are supposed to happen, unwrap and give it its own material. Create an Image Texture node, click on its Open Image button, select and load all the PNGs, plug the node's color output into a Mix Shader, use the other Mix Shader' socket for the skin color you've used for the rest of the head, plug the Image Texture's alpha output into the mix factor socket so that you can see the expressions over the skin:

enter image description here

  • When you've imported your PNG, the Image Texture node has automatically switched to its Image Sequence mode. Set the Frames value to 1. Now you just need to create some keyframes on the Offset value to switch between the different images along the timeline. The Offset begins at 0, so Offset > 0 will be image 0, Offset > 1 will be image 1, etc. In the Dopesheet, once some keyframes created, press T and choose Constant Interpolation so that each keyframe switches directly to the image you want.

enter image description here

  • It should work:

enter image description here

$\endgroup$
2
  • $\begingroup$ Hey, thanks for the tip! I actually had more information on my question but somehow the last two paragraphs got deleted ahahaha, I mentioned I tried in different modes and this one you showed might as well solve my problem! Thanks again, have a virtual hug from me! Oh wait, the virus, nevermind. Elbow touch! $\endgroup$
    – Nick
    Jun 5, 2020 at 16:19
  • 1
    $\begingroup$ there's also a simpler way to use the UV Warp, same modifier as in your video, I'll try to edit my answer tomorrow $\endgroup$
    – moonboots
    Jun 5, 2020 at 16:35

You must log in to answer this question.

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