• 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
0
Question by notashark · Apr 20, 2012 at 03:06 PM · shadertexturematerialcolor

Changing Eye Colour (Colour only non-white parts of a texture?)

I'm fairly new to working with 3d models, so forgive me if I'm misunderstood some fundamentals here.

I'd like to change the eye colour of a model. There's a separate material for the eyes already, though right now, if I colour the material, it colours the whole eye, not just the pupils. (e.g. red eyes

Is there a way to colour just the non-w$$anonymous$$te parts of the material? I am guessing that t$$anonymous$$s may be somet$$anonymous$$ng w$$anonymous$$ch can be ac$$anonymous$$eved with shaders, but any help getting started with that would be appreciated.

Or, alternatively, if I am approac$$anonymous$$ng t$$anonymous$$s in totally the wrong way, do let me know! Would a better approach be to have a number of different eye textures altogether?

redeyes.png (14.8 kB)
Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by T27M · Apr 20, 2012 at 03:38 PM

I would just create a texture with the desired look. Unless you have a reason for wanting it to be coloured in unity? In that case you could create different textures/materials and switch between them with a script. You will be able to create the look your going for much easier with textures rather than solid colours.

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 notashark · Apr 20, 2012 at 03:43 PM 0
Share

Well, I want to have a generic eye, but allow the player to use a colour picker to customise their character's eye colour; I've already done this for skin colour, etc, but the problem is that the eye is all one material which doesn't separate the iris from the rest of the eye.

avatar image T27M · Apr 20, 2012 at 03:55 PM 0
Share

Ah I see makes more sence now. Having not used the shading options much I can't help you there. But spliting the material into 3 seperate ones would let the player customise eye/iris/pupil colour.

Heres a link to the unity shader tutorial http://unity3d.com/support/documentation/Manual/ShaderTut1.html

avatar image
0

Answer by Piflik · Apr 21, 2012 at 07:39 AM

You could make three textures (red, green and blue) and let the player mix those.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Material doesn't have a color property '_Color' 4 Answers

Multiple Texture Colours 2 Answers

Is there a way to blend textures into a material based on a noise map? 1 Answer

Car paint looks not good? 1 Answer

How to access Emission Color of a Material in Script? 5 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