• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by DMeville · Nov 08, 2013 at 08:17 AM · animation2dtexture3deyes

2D eyes on 3D character?

I'm fairly new to Unity, but I have been playing around with it for a w$$anonymous$$le making small t$$anonymous$$ngs and stuff - mostly small test like t$$anonymous$$ngs, however I can't t$$anonymous$$nk through what would be the best way to go about t$$anonymous$$s... 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 ac$$anonymous$$eve: [[Image]][1] [[Video#1]][2] [[Video#2]][3]

For everyt$$anonymous$$ng 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 t$$anonymous$$s 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 somet$$anonymous$$ng? I can't figure out how to even begin doing somet$$anonymous$$ng like t$$anonymous$$s, and since the model would have uvs how would you align these facial textures?

Or am I t$$anonymous$$nking about t$$anonymous$$s 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 t$$anonymous$$nk 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

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaveA · Nov 08, 2013 at 08:53 AM 0
Share

Not quite the same but maybe useful for you? NaturalEyes

avatar image ShadoX · Nov 08, 2013 at 12:23 PM 0
Share

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 instead 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 mind

avatar image DMeville · Nov 08, 2013 at 11:47 PM 0
Share

Thanks guys I'll take a look into those and see if they'll help me!

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

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 t$$anonymous$$ng there using an alpha texture for the eyes. Make sure t$$anonymous$$s doesn't cast shadows on the rest of the face with dynamic lightning. I'd recommend going with solution A

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DMeville · Nov 08, 2013 at 11:52 PM 0
Share

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 Maya 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.

avatar image zephyr7 · Nov 09, 2013 at 12:07 AM 0
Share

It's been a few years since i last touched Maya 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 Maya.

But if option B works for you and doesn't cause shadow issues in your setup, that's fine too of course ^^

avatar image
1

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/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I animate the surface of a 3D object? 0 Answers

Best Practices on 2D Animation? 1 Answer

How can I create a paint splash effect? 1 Answer

How to make a half 2d- half 3d main menu?? 1 Answer

How change sprite animation texture?? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges