- Home /
Texture size limit
Is there something that limits me from using a single huge terrain texture in Unity?
In facts, the world in an hypothetical game would be composed by average-sized environments, not huge. Think of a deathmatch level in Unreal. Is it conceivable that I use no tiles, but a single huge texture, color plus normal, in such environment? Can Unity handle it?
Somewhere I read that a single material is quickier to render for Unity than many. Right or wrong?
So is a single material with very big textures quickier to render than many with smaller textures?
Am I forgetting something?
I believe the largest texture you can have is 4096 * 4096.
Answer by skovacs1 · Nov 22, 2010 at 10:57 PM
Yes, as PeterG commented, the largest size for a Texture 2D is 4096x4096. If you can fit/map all of your detail into that then you can do it just fine. For larger, more complex objects, this means that you will spend a fair amount of time setting up your UVs.
Unreal levels are built one of two ways, BSP brushes that carve out the area or imported models, but a combination of both is common. For texturing, they apply tiled textures to surfaces and you can edit the UV's as you like. For imported objects, your UVs should be setup correctly so that you can just drop your textures onto those objects because it is a pain otherwise. Whatever you decide to construct your level with in Unreal, the general method applied is to reuse the same textures and pieces. It's not about using one giant texture across the surface but very few reasonably sized textures as much as possible.
The fewer the materials you have, the quicker the scene can render, but this applies primarily if your draw calls can be batched which for very complex objects isn't going to happen. In that case, they recommend you combine the objects into one mesh. Assuming your UVs are good and you're using the same material, this will speed things up. See the docs.
As has been said so often, it's not the size that matters, but rather what you do with it (hence the size limit) and, as always, quality over quantity. A few medium-sized textures that are properly used/re-used will look just fine and render fast. Consider adjusting your UVs to index different parts of a medium-to-larger material so that you can combine your smaller textures into one. Using texture blending and the like, you can also reduce the amount of unique textures used if applied wisely.
Less is more and the idea is to have fewer meshes, materials, and textures (proportional to the number of materials).
If 4096x4096 is the largest Texture2D size allowed, why does the documentation for Texture2D packing have the line "Texture2D atlas = new Texture2D(8192, 8192);" in its example?
http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.PackTextures.html
Answer by jeff-smith · Aug 18, 2015 at 04:45 PM
Depending on the GPU available, you can create textures larger than 4096x4096. I am currently creating 7200 x 3600 pixel textures in our TerraViz project. I believe that 8192 is the upper limit.
Answer by HinxVietti_WITL · Apr 07, 2020 at 11:02 AM
This is the largest size of a texture that is supported by the graphics hardware. Note that even if the GPU could support a large texture size, for example 16384, you could still simply run out of memory if trying to create one (16384x16384 texture at 32 bits per pixel is 1 gigabyte of data, which may or may not be available).
Check this .
https://docs.unity3d.com/ScriptReference/SystemInfo-maxTextureSize.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613084104im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
EPIC Environments in Unity 4 0 Answers
Project path settings C# 1 Answer
Load and Compilation time issues 0 Answers
Why the shader responds differently to Tri-color ambient light vs. Skybox lighting? 0 Answers
Parts of a model won't texture 1 Answer