How to Make a 2D Animatable Face in Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I made a video before going over how to make a 2d animatable face and blender for that it was pretty simple just making material with an image sequence with all the faces you want then just cycle through them with the offset slider and animate it but with Unreal Engine you can't quite do that so here's the best way I found to make a face that can be animated with animations Blueprints and the sequencer it's also the easiest way I've found to do this okay so first let's start with the setting of The Modern blender for this you don't have to do much just give them a unique face and mouth material if you wanted to be animated separately though you have to make sure that the textures have all the faces you need in them so like one long texture like this to do this I found the website that convert images into one of these so just drag out your face images there and you have what you need just make sure to make one for the eyes and one for the mouth or anything you want to be animated separately the rest is however you normally export something now bring it into Unreal Engine and make a new material first change the output to masked then get the textures for the faces and detach the base color to either the color or the emissile I also find unlit looks best for these kinds of 2D faces and now what we want to be able to do is to update the face by changing an integer value so the way I found to do this is by first adding a texture coordinate then put it into an ad now make two constants a divide and and a pen now promote one of the constants into a parameter and to plug it in like this now just change the Divide to however many faces there are in texture for me it's seven so I said seven now on the material output increase the number of customized UVS to one then plug the ad into the customized UV slot now you should be able to change the face by increasing the value in the offset now for changing it in a blueprint I like to make two functions one for the eyes and one for the mouth next add an integer for one of the inputs now you're going to need to add a reference to your character's mesh then get the create Dynamic material instance with the source being the face material also make sure that the element index is the same as the one on your character mesh this is how it knows which material to change next with the return value make sure you set the scalar parameter to which face you want just make sure to name the parameter material exactly the same as the one in the material this is how we will find it in know which one to use I also like to use a is a valid check with the first material instance as a parameter to make sure I'm not needlessly creating a material instance every time I call it okay but what about animated with an animation for this you need to make an animation Montage with whatever animation you want then add a notify and name it something like happy eyes or angry mouth just you know what it is then in your character's animation blueprint which I'm assuming you've already had because I am not going to show you how to make in this video because that would take way too long you can just add in advance with the name of your notify now you can trigger the face change event from that animation and although I haven't done it yet I'm pretty sure you can trigger the face change event in the sequencer for cinematics [Music] and I'm sure you could also just add a Boolean to manually change it and stop the animation Montage from changing it automatically [Music]
Info
Channel: Cake Box
Views: 3,052
Rating: undefined out of 5
Keywords: blender, art, animation, 3d, Unreal engine, tutorial, simple, easy, face, texture, material, cinematic, UE5, blueprints, models
Id: Mpgb-A9yVh8
Channel Id: undefined
Length: 4min 8sec (248 seconds)
Published: Sat Sep 23 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.