- Home /
What is the best way to tile the same material on objects with varying sizes?
I've seen this question asked in other posts but haven't found a good answer so far. See attached photo for reference. (Note: this is a 2d top-down game in a 3d environment)
I have a parameter around my scene. I want this parameter to have the same texture all around. My first thought was to create some quads for each of the wall sides, but obviously the texture was scaling according to the quad size, thus becoming distorted. So then I decided to create individual "wall" units as cubes and just repeat them all around my parameter.
My question is: Is this the best and most efficient way to do this? And by efficient I mean both in terms of practice and game performance. I'm wondering if these many cubes, all with the same texture, will eat up more resources compared to having larger single-object "sides" with some other (unknown) way of applying/tiling the texture, and it looking consistent no matter the size of the object.
Generally, the less seperate GameObjects, the better. Using seperate cubes for each segment is vey inefficient and becomes downright impossible with larger levels due to performance issues.
Create a simple quad mesh by code, so that each texture area has one quad. This way, you can easily tile the texture.
Your answer
Follow this Question
Related Questions
What is wrong with my tiling shader? 1 Answer
Performance Question: Baked textures vs Procedural shaders 0 Answers
Batch texture sampling in shader? 1 Answer
Random Tiling Textures 0 Answers
Question regarding TileMap Performance 0 Answers