Home Unity

Eyes / mouth as animated textures

polycounter lvl 10
Offline / Send Message
sympatik polycounter lvl 10
Hi. I duplicated some polys of the character from the areas where eyes and mouth must go (and uv-ed 'em apart, with their own material in the modeler: it's a 256x256 texture with the polys fitted at centre) : this 'cause I would like to have 2d texture's eyes and mouth instead of other polys, so I thought that I had to duplicate a copy of these polys in order to show upon them the eyes and the mouth (with alpha, obviuously). Then I added these polys as childs to the main character, moving by some pixel in z and y in order to avoid ghosting. So far so good, but... The issue rises now: how to change these textures when blinking and show emotions (ungry, happy atc etc)?

Replies

  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 20
    If your uv coordinates span the entire 1-0 uv space then you would have to swap textures at runtime.
    What id recomend is to create a texture sheet with all of your facial expresions then scroll the uv's at runtime to specific coordinates that will match the intended expresion.

    If you divide your map evenly then you can do some simple division on the uv tiling properties of your shader to pull up the intended expression, otherwise you'll have to play with the tiling values in the inspector then hard code the desired values
  • sympatik
    Offline / Send Message
    sympatik polycounter lvl 10
    Hi Mike. Before I came here to ask, I see some tutes about, but not for my specific need or similar, so I went here ask about my case. I was in doubt wheter to use a 1-0 uv or a strip: what's better? As of how to pull 'em, I don't even guess how to do. I'm juyst a modeler and I didn't figured that it could be so difficult or even it had need of any script or twisty workabouts.
  • sympatik
    Offline / Send Message
    sympatik polycounter lvl 10
    ok understood.
Sign In or Register to comment.