The problem is pretty simple in this case. The idea comes by way of re normalizing a height map array by dividing by the arrays maximum height map value, and then multiplying by a new scaling factor (or a new maximum height).
Why do this?
While you could re translate all points by the difference of the new maximum heightmap value relative the old one, this would merely translate points in the same metrically scaled way, meaning that the overall geometry of the terrain mesh would appear the exact same post translation. On the other hand, by re scaling geometry with a normalized data set, we can think of this as weld fixing the minimum possible heightmap point (value zero where normalized range of data is in the range [0,1]) while the rest of points with higher values are scaled to a new heightmap value of n(p)*newscalefactor where n(p) is the normalized point coordinate value (in [0,1]). The effect of this is a scalar distortion of the geometry (or exaggerating or diminishing) the differences between the highest and lowest point of a given data set. Thus if you want to turn mole hills into mountains, you might try performing this algorithmic procedure to your heightmap data set.
No comments:
Post a Comment