- Home /
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.
Is there a way to colour just the non-white parts of the material? I am guessing that this may be something which can be achieved with shaders, but any help getting started with that would be appreciated.
Or, alternatively, if I am approaching this in totally the wrong way, do let me know! Would a better approach be to have a number of different eye textures altogether?
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.
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.
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/$$anonymous$$anual/ShaderTut1.html
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.