- Home /
Texure animation - Blinking eyes
Hello community. I´ve seen there are some tutorials that show how to animate a texture "slide" like a waterfall or river current. I´m trying to get to a form of control over the timming of a texture, to make a character´s "blink". Basically I´d have a facial texture with eyes open, and then another one with eyes closed. Since I know there would be implications with drawcalls I´d like to know if there´s a way to accomplish this effect? Also blinking lights by texture would be a plus (say a police car siren, flashing from green to red, etc...) Thanks.
Answer by CanOfColliders · Feb 26, 2012 at 10:51 PM
Thats one mesh for the full face?
You could manipulate the uvs, shifting them between the eyes open and closed (if both are on the same texture image) or swapping the textures. But for just eyes blinking (suppose thats just a tiny part of a big texture?) i think its a bit of overkill for something like this. If you want to try it though, take a look at the mesh class http://unity3d.com/support/documentation/ScriptReference/Mesh.html mesh.uv especially.
Another way is to put the eyes closed texture part on a couple of faces, floating just before the open eye on the face. Then reposition them in an animation, 2 frames one where its supposed to be, to make it look like the eyes are closed, the other hiding it (like move it into the head, or wherever it can't accidentally show up). Then you can cycle between "open" and "closed".
You see that a lot on lowpoly models (f.e. world of warcraft models do that from what i remember).
Alternatively, without animation, position something at the eye (empty) you can refer to, to reposition the faces.
Or of course, if you have enough geometry in the face, actually moving the verts to do a blink.
Answer by sirdavid23 · Jun 19, 2012 at 04:12 PM
I know you can script the uv´s position to make a waterfall. I don´t know if the same principle applies here. I´ve seen textures where the mesh has the uv structure set like the head in place, and so the "default" eye sockets, but then there´s a sequence on a side on the uv texture that makes for the blinking eyes animation. I am wondering how do they make the character blink with such uvs?
Your answer