We make a grayscale heightmap of the terrain, and then generate a mask on the fly based on that heightmap on everything greater than a specific color value and anything less than another color value
From there, we grab chunks of the heightmap to average the directionality of height values
Tthe averages tell us direction of slope, then we have a much more coarse resolution to utilize referring terrain movement hinderence based on movement direction
Should be easy and CPU efficient to run this way
[ ] Implement a method to generate a grayscale heightmap from initial terrain data.
[ ] Switch to using Gaussian blurring for generating the heightmap to smooth out noise and enhance features.
[ ] Develop a system to create masks based on specific color thresholds in the heightmap.
[ ] Implement functionality to define upper and lower color values for masking areas of interest.
We make a grayscale heightmap of the terrain, and then generate a mask on the fly based on that heightmap on everything greater than a specific color value and anything less than another color value
From there, we grab chunks of the heightmap to average the directionality of height values
Tthe averages tell us direction of slope, then we have a much more coarse resolution to utilize referring terrain movement hinderence based on movement direction
Should be easy and CPU efficient to run this way
ImageMagick
/convert
to optimize output.pngquant
to reduce file sizes while maintaining quality.