- Home /
Multiple Unity shaders based on a texture / material
Hi people :) I have a question ;)
Suppose I have 1 object, for example, an ax. Now this ax consists of different parts like the handle, the metal body etc. If I now the whole unwrap and texturize, then I use for the handle possibly a Holztexture, for the metal body logically irg. What iron similar and vllt I haul around the handle nor a leather strap just for visual appeal.
The whole thing I have in a 1024x1024 texture which has a material. Now I want to use a shader that makes the metal shine a bit. So in Unity, in the Standard Shader settings, I just set the Metallic Slider a bit higher. ---> Stupid !!!
Now my wood is suddenly shiny :( shiny metal beautiful and good but shiny wood or even worse a reflective leather strap ^^ rather uncool!
So my question is, how can I say that only the part of my UV map, which belongs to metal, should get the shiny / reflective shader and the rest of my object a matte shader?
Would like to avoid draw calls etc. like! Also too many materials would be nice. I want to get nice research paper with an ax with 3 materials -> does it affect the performance? And when I end up having 10 gameobjects all with 3+ materials ...
In the end I would like to have a texture atlas say 4096x4096 in which all my textures contain (wood, metal, leather, fabric etc.)
Does anyone have an idea how to get to the point?
Answer by callebo_FK · May 24, 2018 at 09:25 AM
Are you using Unity Standard Shader? In that case I guess you see the "Metallic" texture you can input. That texture sets how metallic something is. White is metal, black is non-metal. So in your case, your wooden handle is black in the metallic texture, your metal parts are white.
This is how the differnet textures may look:
Some info about metallic workflow: https://docs.unity3d.com/Manual/StandardShaderMaterialParameterMetallic.html
So you need to create an additional texture which is black and white, where black is non-metal and white is metal and put it into the "Metallic" slot!
Your answer
