- Home /
splatmap limits
Hello everybody, from what i've understood, correct me if i'm wrong, a splatmap applied on terrain in Unity has the "limit" of handle 4 texture max. above that, a new splatmap would be generated and this mean that the rendering engine would take more because should parse more texture splatmap
question is: this limit, happen when you have more than 4 mixed textures on the same splatmap pixel, or on the whole map?
if this happen everytime you use more than 4 textures on the whole map (and i think this is the case because it should use a channel for texture), then what's the best approach to design a map with several textures?
something like 2 kind of grass, 2 types of dirty, 3 tipes of stones for mountains around, maybe some snow/sand textures, etc..?
should i have 2 overlapped terrain? ordering textures based on usage? any advice?
thanks
Answer by tanoshimi · Nov 14, 2014 at 02:34 PM
The reason why a splatmap has a "limit" of 4 textures is because the influence of those textures is encoded in the Red, Green, Blue, and Alpha channels of the control texture. If you were to add a fifth texture, its strength would get encoded in the Red channel of a second control texture. So it's a property of the material assigned to the terrain, not to a given pixel or the map itself.
You can (in theory) keep adding additional textures to a terrain material, and each time you start a new batch of 4, a new control texture gets created (although, in practice, you'll probably run out of texture registers on the graphics card quite quickly if you add more than 8 textures).
There are a few tricks to creating better looking terrains that hide the possibility of players noticing repeating textures: Some of it is simply using high-quality seamless textures, but you should also consider the lighting in your scene, and what shader you are using on the terrain material. Decal textures can add variety, and I've also seen people add random noise to the different terrain splat UV offsets and scaling, which is a very effective way of reducing obvious repetition.
can you share some useful links about decal and UV splat (i suppose it have to be scripted, no problem at all with C#, it's my daily job, but i'm not experienced in shaders, mappers and 3D in general, i'm learning)
so teorically if a map would have different materials, it would be possible to assign materials to some areas, and then having single splatmaps per material?
just a theorical question, because i know terrain as the limit of having just 1 material (would be nice to have different materials so you could have better looking mountains that uses a material, and ground that uses another, etc...
Hi, you can also check the shader's source code to see exactly how it's done: it's not very complicated to read if you have some program$$anonymous$$g experience. Shaders are here: http://unity3d.com/unity/download/archive/
If you model your terrain in a 3d application rather than using Unity's terrain system (which is functional and intuitive, though a little limited), then you can break it apart into separate meshes for, say, the mountains, and use separate materials on those (which, in turn, may use splat maps to blend several textures together).
See here for an example of varying texture scale: http://forum.unity3d.com/threads/improved-terrain-texture-tiling.116509/
Your answer

Follow this Question
Related Questions
Splat Map with transition texture? 0 Answers
Can you change terrain material? 4 Answers
Splatmap dry/healthy 1 Answer
Deleting terrain splatmap through scripts. 1 Answer
Undo changes made on terrain's splatmap 3 Answers