- Home /
Terrains are not as seamless as their heightmaps.
I have 2 heightmaps combining seamlessly but when I import them into unity they don't seem seamless. Heightmaps are 257x257 and I use these settings:
What is the problem?
here are screenshots:
I am having the same issue. $$anonymous$$y infinite terrain is not seamless, even though the heightmap is.
The problem is because the heightmap images are not seamless. When you put the two images next to each other, they appear seamless. Because as pixels, they transition nicely without any duplication/shared information along the seam.
HOWEVER the connecting edge of two terrains must share the same vertex height information along the seam. So when you put the images together, there should be a visible seam, where the pixels on the edge of each texture along the seam are the same.
This is where the problem lies. Each pixel represent the height at each vertex position, therefore along the seam they must be the same on each edge of the seam, to represent that they have the same vertex height as the one it is aligned next to.
Thanks for the information. What if I create one huge heightmap and divide it into several small ones and then make use of them?
There are several ways to overcome this problem, like storing the pixel information in one large array, then organize reading that array so that you read from the same array position on each side of a seam.
The best way to solve bugs is to remove them at the source, not implementing work-arounds. Exa$$anonymous$$e how you are generating the heightmaps : is there a way for that to include shared pixels along the edge of each seam?
Generate the module for the full size of all your terrains. Then read 'chunks' from the noise module so that the edges are overlapping.
Your answer
Follow this Question
Related Questions
Terrain size and 16 bit heightmaps 0 Answers
Set Hightmap resolution while importing custom heightmap texture? 1 Answer
Why is my terrain so bumpy when I use heightmaps? 1 Answer
What makes up the binary data of a 16-bit heightmap? 0 Answers
Unity imports heightmaps in kind of upside down order. 0 Answers