Game4all / bevy_vox_mesh

A bevy engine plugin for loading magica voxel files directly in bevy as usable meshes.
MIT License
32 stars 8 forks source link

Loaded mesh shifted #4

Closed kgv closed 1 year ago

kgv commented 2 years ago

Light gray voxel is loaded from ".vox" file with Transform::from_translation(Vec3::ZERO). But in fact it located at (1,1,1) Untitled

Game4all commented 2 years ago

This stems from the meshing which requires the voxel data to be padded by 1 on each direction, resulting in the observed offset. This just needs a processing step post-voxel meshing to fix the offset issue.

kgv commented 2 years ago

Since this is a known specificity of the internal implementation, then we can close the Issue. I thought that this might be a bug in the implementation

Game4all commented 2 years ago

I'll leave this open as a remainder to fix this.

kgv commented 2 years ago

If I understand correctly, it's dependent issue: https://github.com/bonsairobo/block-mesh-rs/issues/6 ?

Game4all commented 2 years ago

yes altough that can be fixed by applying a post-processing step on the generated vertices to remove the offset.

Game4all commented 2 years ago

@kgv Just pushed c152b3cf5923b9fae50e0c8d97abde9cf8ea5d39 on master which should fix the aforementionned issue.