- Home /
How to use several textures on a mesh - like the terrain does?
How can a mesh be painted with multiple textures, with different opacities in some spots? I'm guessing this would need to be done in modeling software, but still not sure how to choose opacities between them at different parts of the mesh. This would be helpful in breaking up boring repetitive textures, as the terrain system in unity allows.
typically this is done in the modelling software lieke you thought. in maya you break the object into smller objects, assign new textures to them, then recombine them and sew up the verts. then when the fbx is imported into unity it will come with multiple materials in an array on the object which will be assigned to the faces you speciied in maya. In 3dsmax you use subobjects, and similarly upon importing it will come with multiple material slots in an array.
To make part of the model transparent you simply need to change the material's shader to one which supports transparency; but the same method applies.
alternatively you can do this in a 2d package like photoshop combined with some shader writing. Simply create a greyscale image that will define which areas will be transparent and which areas will be opaque. (usulally white = opaque, black =trans) then creat a custom shader which has a map that will allow you to control which areas are transparent. I would highly recommend the 3d modelling software solution though if you can.
I would think somehow you could just tile all the textures you want onto the mesh, and use transparency to blend them all where ever you want. Can this be done with a shader? Assign maybe an alpha for each texture? Or maybe would need a material for each texture that is being blended. Trying to understand what direction to look in, never written a shader.. yet.
It's a shader effect - you use the textures and the the merging between the sources is done by reading colours from a "control" texture... You can use things like T4$$anonymous$$ to do it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613104549im_/https://answers.unity.com/themes/thub/images/avi.jpg)