Animating facial features with texture swaps - Unity and Blender tutorial

preview_player
Показать описание
I recently discovered a simple and neat technique for animating facial features on 3D cartoon characters in Unity by using texture swapping on a small area of the model.

This tutorial shows a very brief breakdown of the basic principles to help get you started.

I use Blender for the 3D modelling part but this technique would work just as well with any other 3D modelling package and game engine combo.

Apologies that I skip over the scripting part quite fast. The important part of the technique is the setting up of the model with the separate mesh for the eyes that cover a wider UV space. The scripting wasn't really the focus here so I ran through it rather quickly.

Рекомендации по теме
Комментарии
Автор

5 years later and this is maybe the one of the only relevant video for my case, thanks so much for providing this!

mjdevlog
Автор

It's crazy that this is the only tutorial I could find to know how to do this. Thank you for uploading this.

MastermindAtWork
Автор

Great tutorial. However...

Using different textures is not optimal since you're actually uploading these textures to the GPU. Since you're only dealing with 2 it's no big deal but a texture animation could have 24+. For those reading this, i recommend you use 1 texture sheet with all states and change the offset of the texture on the material over time instead.

motormousegames
Автор

Simple solution. Elegant result. Thanks for the tutorial.

kakarotsan
Автор

hipity hopity nintendos facial animation system is now my property

ThePCxbox
Автор

Ooh I was just looking for something like that!
In the beginning I was trying out multiple UV's, and multiple materials, but they never worked out.
Seems like the best way really is to have the eyes/faces be their own little mesh

One mistake I did was keep a second UV for the second mesh. I thought it's needed, but it turns out it caused problems rather, since unity can't manage two UV's, even if they are on two different materials(unless you write your own shader or so I heard). Since it's still handled as a second UV, even if it's technically the first UV the second material uses
I just didn't realize the same UV can be used for different images on different materials for different meshes

Cgeta
Автор

yes thank you so much for don't have the time to cover my game-chars faces in bones and this is indeed a very elegant logical solution, gonna try it right after my pizza :) Thanks again! Even though I'm surely not gonna play your game as I'm not quite part of the audience who would^^, but it looks very clean and "fun", good job!!

hubiguschti
Автор

I love your cute and simple UI here - anywhere we can play around with it? In game or as an asset?

jakecarvey
Автор

Thanks for the video, really nice technique! I was wondering how you would deal with a sprite sheet animation as the face? I think once you have a more complex animation with several frames switching and timing them via code isn't really an option anymore. What would be your take on that?

chooper
Автор

Thank you for the tutorial ! I want to use this technic for my all my game character which are cartoon style. But I wonder if it is possible to export the texture swap in the animation in blender itself instead of having to swap it per code in unity? I would find it more easy this way. Do you you think you can export this kind of information in an animation?

francoisneko
Автор

Do you go one to animate the objects together in blender? Hoe do you go about it?

Do you parent the new objects to the initial model and then animate the initial model?

jakebrooks
Автор

Is there way to to do texture swapping with blendshapes in unity? So far you are the only one with information on this anywhere it seems

Drayman
Автор

This is for blinking. How to instruct the engine to perform other swaps (such as amazement, rage etc)?

fustigamatti