Hi @sdj544 -
Very glad to hear the script is helping you.
The script is converting a grid (or mesh) of pixels from an image into a grid (or mesh) consumable by Fusion. When converting from the pixel grid to the mesh surface, it uses the settings as such:
Pixels to Skip : How many pixels to ignore as the script steps across and down the pixel image to generate the mesh. This is essentially reducing the resolution/quality of the image. Assume you have a 1000x500 pixel image. Setting this value to 10 will cause the script to use every 10th pixel: X dimension 1000/10 = 100 pixels and Y dimension 500/10 = 50 pixels. Therefore, the mesh that will be created within Fusion will be 100 x 50.
Stepover: The stepover indicates how far apart each gridline will be in the mesh that's created. If you set the stepover to 2mm, then for the 100 x 50 grid in the example above, the script will create a mesh that is (100 * 2mm) x (50 * 2mm) or a 200mm x 100 mm mesh.
Max Height: The height at each node in the mesh/grid is determined by the color/brightness of the pixel and the max height value. The color of the pixel is normalized (0 to 1) and then multiplied by the Max Height value. A black pixel would generate a height of 0 whereas a white pixel would generate a height of Max Height. This makes the most sense for height map images in which heights are mapped to gray scale. For colored images the color value is also normalized but it does so by calculating a brightness (0 to 1) and then multiplying by the Max Height.
For the issue of the mesh depth exceeding your specified Max Height, I'm not sure what is occurring. I'll have to to some testing. At first I thought the issue was caused by changing the stepover which causes it to select different pixels whose "height" is different from the pixels selected when using another stepover value. For example, one stepover value may cause a set of black pixels to be selected while another stepover causes white pixels to be selected. But even in that case, the code should be limiting the mesh height from 0 to Max Height.
I'll do some checking and see what I find.
Thanks.
Hans Kellner
Senior Manager, Principal Engineer