- Home /
2D eyes on 3D character?
I'm fairly new to Unity, but I have been playing around with it for a while making small things and stuff - mostly small test like things, however I can't think through what would be the best way to go about this... What would be the best way to to add a 2D animated clip of eyes blinking, on a (UV Mapped) 3d mesh? Ultimately is what I'm trying to achieve: [[Image]][1] [[Video#1]][2] [[Video#2]][3]
For everything I've done so far, I've just had static features drawn into the textures, but throwing animation into the mix has confused me.
I've downloaded a few free assets from the asset store and it seems (at least the ones I downloaded) simply swap out the entire texture for the model, with the facial parts of the texture modified. Isn't this not really a good way to go about it, as most of the texture would be the same?
Alternatively, would it be better to texture the character without eyes, and stick them on afterwards from another texture or something? I can't figure out how to even begin doing something like this, and since the model would have uvs how would you align these facial textures?
Or am I thinking about this all wrong?
The next step ideally was to make it fully "dynamic", like in the Windwaker video above - where I could control where the eyes are looking, but I think I have an idea how to do that bit.. Any input from you knowledgeable unity3d-ers would be fantastic! Thanks guys! :)
[1]: http://imgur.com/B9Jb31t
[2]: http://www.youtube.com/watch?v=QGn2cgQYszY
[3]: http://www.youtube.com/watch?feature=player_detailpage&v=itD2Hvcf81Q#t=153
can't really suggest anything besides just trying out the ideas that you had / saw about swapping textures as I imagine a lot of games doing that.. actually you pretty much described how I imagine it working.. just ins$$anonymous$$d of replacing the whole models texture, try the head only or just have simple tiny pieces for the eyes and mouth ...
Something like http://answers.unity3d.com/questions/19848/making-textures-scroll-animate-textures.html comes to $$anonymous$$d
Thanks guys I'll take a look into those and see if they'll help me!
Answer by zephyr7 · Nov 08, 2013 at 02:09 PM
I'd choose one of these ways to go with: A) Keep most of the model as is, but assign a seperate texture to the face/eyes. You simply have to cut UV seams along the edges around the eyes, and map the now UV-sperated polygons of the eyes on your eyes texture; In your eyes Texture you could have eyes looking left at the top, eyes closed below that, eyes whatever below that and so on, all in one texture sheet. You map the eye polygons to fit exactly one of these variations perfectly.
Now when you take that model into unity, you should see two materials on the model. On the eyes material, set tile to 1/number-of-variations-you-have-per-row-in-texture. Now you can modify the x/y offset of the eye material to change the state of the eyes as you want to. You can either do that by script as explained above, or you can do it manually with unity's animation editor by editing the uv offset attributes of the eyes material. Note that if you animate it by hand you have the curves all edgy so it jumps straight from one state to the next rather than scrolling all through the texture.
B) You could also remove the eyes from the main character texture, and put planes or fitting geometry for the eyes in front of the eyes instead, and then do the uv tile/offset thing there using an alpha texture for the eyes. Make sure this doesn't cast shadows on the rest of the face with dynamic lightning. I'd recommend going with solution A
Thanks for the reply!!
Regarding option A: Unless I'm missing something obvious, simply creating a new uv shell for the face won't allow me to set a different texture for that shell, as since it's part of the same mesh it's in the same UV space as the rest of the mesh. I'd have to extract it as a different object in $$anonymous$$aya in order for me to assign it a different material, wouldn't I? Which makes this method nearly identical to option B.
I'll continue to tinker away but I think option B might be a good shot, unless there are other ways I've yet to know about.
It's been a few years since i last touched $$anonymous$$aya so I don't remember how to do it in maya, but there should be a way to assign different materials to different parts of the same mesh, i'm 100% sure. You should find something if you google multiple textures/materials on the same object in $$anonymous$$aya.
But if option B works for you and doesn't cause shadow issues in your setup, that's fine too of course ^^
Answer by ashwinFEC · Oct 15, 2014 at 10:33 AM
Here is how they did the eyes in legend of zelda http://www.benjones.us/twilight-princess-eyes-breakdown/
Your answer
Follow this Question
Related Questions
How can I animate the surface of a 3D object? 0 Answers
Can You Animate Main Menu Title? 2 Answers
Sprite animation from 2D to 3D 2 Answers
Can you use 2D joint data to animate a 3D avatar? 0 Answers
2D Animation does not start 1 Answer