vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.05k stars 87 forks source link

VOXCONVERT: Object getting too large when converting .obj to .obj format #401

Open hkunz opened 4 months ago

hkunz commented 4 months ago

I conducted several test voxel conversions from .obj to .obj and observed some inconsistencies. It's possible I may be mistaken, but when converting a 2m sphere (with a 1m radius) using voxformat_scale=4.0, I wouldn't expect the resulting voxel object to expand to 32x32x32m. It would be beneficial to have a method for enhancing voxel detail or resolution without increasing the object size. Perhaps introducing a parameter like voxformat_resolution could address this concern without disrupting any standardized voxel sizes, assuming such standards exist.

command used: .\vengi-voxconvert.exe -set voxformat_scale 4.0 --input C:\sphere-2m.obj --output C:\out-32m.obj --force

image

hkunz commented 4 months ago

but if you export 2m sphere to vox and then back to obj you get the correct 8m output just not when doing .obj to .obj

mgerhardy commented 4 months ago

You are right - the scale is applied for importing and exporting for any mesh format - not just obj. Have to think about it.