- Home /
How do I remove terrain texure blending?
Hello, Unity Answers. I have a bit of a problem. I have street tile textures- each seamless and meant to go right next to another texture without any blending of the two. I am using a terrain, so I can sort of tile the textures (Rather than using a blob brush, I set the Brush Size to 1, and the terrain textures are all set to be 3x3 in the inspector. So it is essentially tiling.) My problem is that the terrain blends textures, no matter what I do. A curb texture next to a street texture blends the two at the edges and it looks, to be blunt, stupid. I tried using quads lined up next to one another, and it looks right, but performance wise it is horrible. It is also difficult to edit. Do I have to hack the terrain shader, or something?
How do I remove terrain texture blending?
Thanks in advance,
-TheBorDr
(The textures, by the way, are all 512 x 512)
Answer by Poppel · Apr 13, 2014 at 06:36 PM
the Unity terrain shader blends the textures. You have to modify the shader yourself, but be aware that the texture placement wont be very precise, depending on how big your terrain is.
Blending is done and stored in the TerrainData alpha$$anonymous$$ap. It is possible through code to read the alpha$$anonymous$$ap and change each splat$$anonymous$$ap texture alpha value.
For alucarj's idea: If you painted the Splat$$anonymous$$ap using only solid brushes, it would already have hard edges. Or sure, a program could go through all splat$$anonymous$$aps and fix any blended parts. Either way, you'll still see a blurring between adjacent textures -- the result of how it has to blow up the splat$$anonymous$$ap, a lot. It seems like you might be able to fix that with PointFilter (it isn't greyed out, at least) on the Splat$$anonymous$$ap.
For poppel: that's like making a cut-out shader. So would allow you to paint however, and the shader would make a ziggy hard border between them. I feel like it might run slow, and would be a pain for more than 4 textures at once (since the shader does batches of 4.) And might still use a program to "fix" the splat-map.
Your answer
Follow this Question
Related Questions
How can I create a grid/tile based shader supporting multiple textures? 1 Answer
FX/Flare is always on top 0 Answers
Unity Terrain shader on non-terrain objects 0 Answers
Changing Replacement Shaders at Runtime 2 Answers
Changing terrain in real time 1 Answer