Open ghorn opened 2 years ago
A grayscale heightmap image basically maps Z from zero to one. However, when outputting the resulting heightmap mesh the XY coords are in pixel coordinates of the heightmap. Hence, a zscale of 1 means that the grayscale heightmap will result in a mesh that can only be as tall as the width of one pixel (because zero-to-one is the width of a pixel on the X and Y axes).
zscale lets you specify how many pixel widths tall that the resulting mesh should be.
Why is
zscale
a required argument? Is it nonlinear - if you scale before vs after does it make a difference?I ask because I postprocess the mesh to scale x/y to something independent of heightmap resolution, and at that time I have to consider the
hmm
z scaling. It'd be easier for my use case to either pass an x/y scaling as well as z tohmm
, or to not pass a z scaling tohmm
and do it myself afterwards alongside x/y. But if I have to pass an accurate z scaling tohmm
for the algorithm to work well, then that's a good reason for it to be the way it is.