- Home /
Seamless texturing?
Hello, I have a few seamless/tileable textures and I'm trying to make a house using cubes as walls and floor. It works fine when the walls are exactly the same size, but when I stretch the cube the texture gets stretched too and does not match the other sized walls. I have tried to tile it differently,but it's really hard to make it match the other walls.
Thanks, Andreas :-)
If you use the same textures for walls with different scales, then this is always going to happen. For what you are doing, you need to create a separate material for each different scaled wall. The only other way using native objects the way you are would be to read the mesh data of the cube, deter$$anonymous$$e a scaled modifier based on the dimensions of your cube, and individually UV map the faces of the cube based on that scale modifier. Totally possible, but requires alot of thinking and coding. For where you are, just create new materials.
Example on reassigning the UVs for a native cube : http://answers.unity3d.com/questions/306959/uv-mapping.html
Thanks for answering quickly :-) Would it be easier to create the whole house in Blender (the 3d modeling software I'm using) or ? :-)
Absolutely. I thought you were using natives as you didn't have a modelling program, or like me are not very great at modelling (I always use native primitives). So my suggestions would be in this order :
1/ $$anonymous$$odel your objects in a modelling program so the textures and UVs are correct as applied when making the model.
2/ use different materials for walls with different scales.
3/ if you have to use native primitives and absolutely have to use the same material, then use code to read the cube and modify the UVs based on the scale.
Go with 1 if you are able, go with 2 for a quick and painless solution. Go with 3 if you love a challenge and can code it =]
Thank you so much :-) I'm not that good at UV-mapping, but I'll give it a try :-D
Your answer
![](https://koobas.hobune.stream/wayback/20220613094326im_/https://answers.unity.com/themes/thub/images/avi.jpg)