- Home /
best tile size for terrain?
when using textures from online they often look terrible unless terrain tile size is 1x1.
From what i understand (and please correct me if needed)
a smaller terrain tile size is going to generate ALOT of calls to the gfx card to render each tile. (hence why i don't want to simply leave it at 1x1 size and call it good)
a tile size too large will result in less calls but occupy too much memory space. (though i'm still not sure outside of being a power of two a good size, and i've googled quite abit looking for an answer, 16x16, 32x32?)
if that is correct then basically can I not take a terrain that looks good in 1x1, tile it myself into to a 16x16 piece, and then save that as a new tile that should hopefully look good now as a 16x16 tile maintaining the high detail while not being a tiny tile?
any guidance, even a web link indicating perhaps roughly how much memory a tile at different sizes takes up or standard sizes or anything really would be much appreciated.
Answer by Owen-Reynolds · Aug 20, 2011 at 06:50 PM
There are maybe 3 sizes:
o TerrainInspector->Paint->EditTextures->Edit->TileSize controls how "stretched" the textures you paint look. 1x1 is going to look good when you are very close, but has obvious tiling as you pull back and be a flat blur from high up.
The default setting of 15x15 looks OK for a camera about 2-4 meters from the ground. Is that really blurry for you? If only 1x1 looks good, you must be very, very close to the ground. You can also use fractions (1.2 x 1.2)
That tile size is only a multiplier in the graphics card, for when it looks up the pixel, so changing it has no effect on speed. Graphics cards love to wrap-around textures with various lengths. Pick whatever looks good. Powers of two aren't special for this number. Feel free to reuse the same texture, with a different tile size, blended with itself.
o The heightMap resolution is the size of the "tiles" you see in WireFrame mode. It affects how graceful the curves in hills will be. Each of those corners is stored and processed during each call, so having more does slow things down. This likes powers of two, since a speed-up is to cut the count in half for far away.
o The ControlTextureResolution is the size of the "brushSquare" tiles, when you paint terrain. Increasing this will increase the amount of memory (it's stored as a big texture over the whole ground, like a shadow map, but with grass/dirt/snow instead of shadow.) If you have only one texture, this won't appear to do anything. Since it is a texture, it should be a power of two (graphics cards can read from those faster.)
oh ok so basically the gfx card goes to draw each pixel on the screen and that tile size really just affects an algorithm to deter$$anonymous$$e which pixel in the texture in memory matches up with the pixel it should be drawing on screen.
Since it's going to have to draw every pixel and always do that algorithm anyways tile size just changes up the algorithm but not in a meaningful way. (hope that's right)
It's not always that it looks bad as a 10x10 for example, but it takes VERY little increase for me to feel the proportion is wanky. since increasing tile size basically blows up the image it becomes a kind of zoom in and when people take these pictures there already SUPER zoomed in so they can get all this detail but when you zoom in on a picture that is already so zoomed in you can tell one grain of sand from another grain of sand you end up with maybe 100 grains of sand by 100 grains of sand covering an area of 10 feet which makes them all silly big. basically increasing the multiplier results in grass and sand and stuff that is way too big if it makes sense.
quick question, max res per patch? even when its asked in unity answers no one has actuallly answered what it does. any idea?
thank you very much for the help!
Yah -- tileSize is used in something like pixColor = textureLookup(grassTexture, groundCoord * textureScale);
, where textureScale is your tile size with some extra Unity math. If textureScale is 1 (tileSize 15?) your grass lines up with the ground mesh squares. If textureScale is 0.21, you get one grassTex stretched over 4.9ish grid squares. Fitting one square exactly isn't special, since, as the camera moves, a terrain square can be any odd size which won't match your 64x64 texture.
I think most people would call a texture of a 1 foot square area of grass or sand a "detail texture." Sounds like you're using it as best as possible. Not much you can to to make it look good on a 10 foot square area. But, you can paint it at 20% on an existing terrain texture, to make the zoom look nicer.
$$anonymous$$ax per patch? I'm going to weasel out and say that needs it's own Q :-)
Answer by Burnbox · Sep 15, 2015 at 06:50 PM
Does this forum not have any moderators?
(response to add-spam, since deleted.)
We mostly like to keep the first few pages clean, on the theory some working experts might check in every few days, at most, but won't wade through 20+ pages of duplicate Q's and debugging requests.
It is odd that someone with 0 $$anonymous$$arma got a spam-ad through the moderation Q, but doesn't really hurt anyone.
Your answer
Follow this Question
Related Questions
Why are my terrain textures pixelated? 1 Answer
Is it possible to change Brush porportion? 1 Answer
Export terrain from Cinema4d to Unity3d 1 Answer
Edit Terrain Script 0 Answers
My terrain textures are still horrible!! 3 Answers