- Home /
How to make the engagement of two textures on terrain more natural?
Hey guys, I'm currently trying to learn how to deal with terrain textures placing. One way that I came up to place textures on terrain is using splatmaps. So I will firstly add different textures in default unity terrain editor. Then I will enable the texture I want at specific coordinate by setting that splatweight to 100%, others to 0. After that, I can get the result below.
As you can see, the whole look is not bad but there's a problem with the boundaries of different textures. They look so fake because of no smooth transition. So I tried mark the boundaries and change their splatweight to 50% of one texture and 50% of the other one. And I got this.
Better but still not good enought. You can still see the lines or boundaries. So, does anyone have a better idea?
think you uploaded the wrong pics: all I see is some ($$anonymous$$orean?) brochure.
Have you tried blending the colors together, and not connect the borders by straightlines but with different paterns?
No, I don't understand what you mean "blend the colors" because for now I can only change the splat weight for each splatmaps at each pixel of the terrain. And for my project, I will only know the location of the boundaries so that maybe I can't change where the boundaries are. But I actually tried something else and it works.
I found the that if I paint the boundaries by using terrain texture brush manually, it looks a lot better. So I tried to use that brush with different brush shapes to paint the borders by script and it looks like this.
There's still unnatural line on border but that is caused by the data sample(I drew it with Paint, so there are some mixed color, which can't be detected as borders, between two different colors. ) This is the brush shape I'm using. Brush Shape
Can you adjust the textures that are used by the splat maps such that they fade to alpha(transparent) at the edges?
I can't just fade the edges of one splatmap to alpha because the splatweight of each pixel must be added up to 1.0. For example, for one pixel at (5, 6), splatweight of splatmap[1] = 0.5, splatweight of splatmap[2] = 0.2, splatweight of splatmap[3] = 0.3. (added up to 1.0)
I meant before you use it as a splat map: fading the edges of the texture asset itself, on disk, that you eventually use FOR the splat map.
Here's a screenshot from one of my projects that I had to randomly generate maps for. Ignoring the gray blobs, you can see two different textures smoothly blended together. This was all done in script. imgur.com/Rg0PEBH.png I can help, but your questions pretty unclear. Are you placing textures manually, or by script? Is it random, or are the locations assigned?
I place all textures by script. I used Paint tool to draw a picture with different colors.So I can use scripts to distinguish where to place the texture I want. For example, blue means grass. I found all blue pixels on my picture and set splatweight of grass at those locations to 1.0 and splatweights of other textures to 0.0. So it is location assigned.
Your result looks good! I hope I can blend my textures like yours.
Answer by VLukianenko · Jul 26, 2017 at 10:38 AM
I know it's an old question, but in case anyone stumbles on it in his/her googling - here's an idea: try using a blending mask, where you'd manually (if you need some complicated blending) draw R and B channel, blending them together - and then multiply your textures by the values of these channels.
Your answer
Follow this Question
Related Questions
Optimizing Terrain painting during runtime. 0 Answers
Terrain texture thumbnail is invisible 1 Answer
How can I export the terrain splatmap? 0 Answers
Terrain texture painting 0 Answers
splatmap textures not applying in build 0 Answers