You can make it positive or negative depending on the coordinate system you want. The Multiplier is a scalar for the intensity.
This is similar to creating bone drivers in Blender.
The source bone is the driver bone you want, and the Source Component is the component you want to drive the Material Attribute. Go into the Animation Blueprint if you created one and add the following nodes at the very end:Īs you can see, I added one Bone Driven Controller per Material Attribute. The next step is to link the driver bones back to the Morph Targets we created. Manipulate the Morph Targets to see them manipulate the eye UV Offsets. They should be in the form of Morph Targets. Go back to your Skeleton Asset to check that they are still there. Strange, I know, but the curves you just created will still exist inside your Skeleton Asset, which is what we want. You then want to delete the curves from the Animation Sequence Asset. Each curve should have the same name as the UV Offset parameter it should modify (This is important!). Open one of the Animation Sequences for your mesh and add 4 new variable curves. The parameters on the right can be changed if you wish. Apply the material to your mesh that you imported. It uses the eye mask to separate the left and right eyes and uses UV Offsets controlled by Material Parameters. It actually uses the same logic as the Blender material. If you look closely, you will see that it looks very much like the set up in Blender. Create a new material and set up the nodes like so: The first step is to create the eye material. Unfortunately FBX files do not carry bone driver information over from Blender. One thing you will notice when playing the animations is that the eyes will not move. In the Skeleton Asset, check to see that your driver bones are in there. For the animation FBX files, you only need the skeleton and the NLA animations. Now you are finished with the Blender side of things! Export the mesh as FBX binary with only the Skeleton and Mesh. Test it out by going into pose mode and moving the driver bones around parallel to the eye bones. You can adjust the equation to your liking. Do this for all the other UV Offsets parameters. Select Local Position for the positioning. Select the Skeleton and the driver bone you wish to drive the UV offset. Apply the bone drivers to the UV offset parameters by right clicking on them in the Material Node view and clicking Add Driver. However, the bones must not be connected. The second bones, the driver bones, should be parented to and point in the same direction as the eye bones. The first bones will be parented to the head, and will act as a base position for the driver bones. Add 2 bones for each eye in the Skeleton. This is because we will be using bone drivers to control the UV offsets. If you have a keen eye, you will have noticed that the UV offsets in the material nodes were colored purple. I would recommend studying this as we will be using the same logic in UE4 for the Eye Material. The results are added together and plugged into the Base Color. The nodes use 2 instances of the eye texture, and blends them with the eye mask texture which separates the left and right eyes. In the material editor, add the following nodes (If it is too small to see, you can zoom in with ctrl+mouse wheel or right-click and save the image): Create the UVs for the eyes only for the EyeMask UV mask. In the Properties Editor under Mesh Properties, go to the UV Maps and create two of them, one for the Mesh’s general textures, and another just for the texture mask that we will discuss later.
Apply the material to both of the eye geometries on your mesh. Give it the eye texture that you want to move around in game or in your animations. In Blender, Create an eye material for your character model. However, similar results can be reproduced with Maya. Here I will show you how I animate 2D eyes using an eye texture on a 3D character model in UE4.