guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.8k stars 223 forks source link

Image to mesh has multiple problems #296

Closed thelabcat closed 2 years ago

thelabcat commented 2 years ago

I'm trying to convert an image sprite to a mesh. However, when I import the image, it is offset by 0.5 voxels on the X axis: image image When I convert the layer to mesh, it spreads out on the Y axis with gaps, and doubles over on the X axis: image My suspicion for the second error is an iteration mistake, though the first one may not be related.

guillaumechereau commented 2 years ago

Seems like a bug, might be due to the fact that your image has an odd width. If that is the case a workaround would be to add a transparent 1 pixel column to your image.

thelabcat commented 2 years ago

Thanks. Will try that.

thelabcat commented 2 years ago

I tried again with a new image of only even dimensions. While the offset is now fixed, the spacing and squash-doubling still happened.

guillaumechereau commented 2 years ago

I just pushed a fix for the offset bug. I couldn't reproduce the spacing bug though. Can you recompile from source to try it out with the current version?

thelabcat commented 2 years ago

Compiled from source, the bugs are fixed. The spacing bug seems to be a result of the Flatpak being too old.

guillaumechereau commented 2 years ago

OK good to hear!