Bug was in scenes with 64 height voxel columns, where no voxels were touching air.
Function is_surface was not returning 1 while iterating on such column which was causing number of colors to be zero. This commit adds additional check for border voxels, which helps algorithm in such case. Z check prevents corrupted files, X and Y checks prevent not writing color for border voxels.
Can be tested with 512x512x64 filled region or with the project attached to mentioned issue
Fix for #52
Bug was in scenes with 64 height voxel columns, where no voxels were touching air.
Function
is_surface
was not returning 1 while iterating on such column which was causing number of colors to be zero. This commit adds additional check for border voxels, which helps algorithm in such case. Z check prevents corrupted files, X and Y checks prevent not writing color for border voxels.Can be tested with 512x512x64 filled region or with the project attached to mentioned issue
Also a small typo fix.