- Home /
create different materials using the same texture
I am trying to figure out how to create materials in Unity using different areas of a texture.
So far I've found a ton of resources about how to create a material and how to use the shaders, but so far they all use 1 texture as whole.
Imagine to have a building mesh, where the texture has different designs for the building (like a building that is damaged and one that is not); I am trying to create 2 materials, so at runtime, I just have to swap the materials.
Now the easier way is to make 2 textures, make 2 materials and problem solved....but I am trying something different: I would like to use 1 texture atlas and make 2 different materials.
So far I can't see how can you do this in Unity, since the only parameters that I see available for a material are not able to mark a different area of a texture, but takes a single image.
Is this even possible in Unity? Should I do it in my 3d package? Thanks in advance.
Answer by Cripple · Sep 05, 2012 at 09:26 AM
The placement of the textures can be altered by changing the Offset and Tiling properties.
Offset Slides the Texture around. Tiling Tiles the Texture along the different axes.
Your answer
Follow this Question
Related Questions
Best method for implementing alternative view modes? (like Cities: Skylines "Info View") 0 Answers
Unity Trees Material/Texture changed 0 Answers
Blender fxb (no texture/material) 5 Answers
Textures not in-tact in FBX import 3 Answers
Change the alpha of part of a material or texture or applying part of a material at runtime 0 Answers