Answer the question
In order to leave comments, you need to log in
How do you work with heightmap resolution (2^k+1) (unity)?
Hey!
Tell me, when you need to correct the terrain heightmap from the code, and you need to split it into a certain number of equal parts, how do you divide it? If, for example, the resolution is 513, and the step by which the area should be divided is 8?
Answer the question
In order to leave comments, you need to log in
You need to split with duplication of vertices inside the seam. Let's take a primitive case with a four by four cell terrain, the size of the vertex array in this case will be five by five. Let's break it into four parts, each side will be divided in half. To calculate the size of the required arrays, you need to subtract one from the side, divide by two and add one. Thus, we get four three-by-three arrays, each containing two by two cells.
For your case, similarly, subtract one from 513, divide by eight, you get 64, add one, you get 65. That's the size of the array you need. At the junction, the vertices will be duplicated, but each piece will be independent.
It is impossible to give a correct answer until you explain why 1 more, why zones and how their size is chosen. Resolution 513, I understand as byte[513,513].
It is impossible to give a correct answer until you explain why 1 more, why zones and how their size is chosen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question