animating texture on mesh

Hello,

Not necessarily exactly related to unity, but i have such little experience with meshes and techniques related to them so i’ll ask it here anyway.

Say, i have this cartoon character mesh which i need to animate facial features by directly changing texture presentation of the local area: mouth/eyes where normal vertex animation can’t just produce the results i want. How would one accomplish this normally?

I guess one way would be to make lots of subtextures for the shader and change the textures appropriately when necessary. One technique I had a quick look at was uv-map animation, but i’m not sure if that’s so used anymore? Separating the object and using different material may introduce some issues later, i guess.

Any help appreciated.

I think this method would be your best bet.

No, i dont think this is possible. You will have to do it in Unity.

Yes, you’ll have to do the UV offset animations in Unity, but using the new Animation Editor to do this should make it fairly painless.

I cant see how the animation editor would help with this. I dont find any options to access uv info through it so it seems I would have to script the functions to apply changes to uv map. Well, thanks a lot for clearing things up a little.

You need to offset the Texture on the Material, not the UVs of the Mesh… “Main Tex.offset.x” and “Main Tex.offset.y”.

But this would mean i would have to have to use different materials or textures for mouth/eyes etc regardless then? So I could use a shader with multiple textures laid on top of eachother and just change the offset of these subtextures to get the effect I want? I guess that would work and be somewhat easy to accomplish.

I tried give the animation to a material using animation editor, but dont work…

What is wrong ?

What property of the material are you trying to change?