When using MagicaVoxel layers, it's sometimes necessary to overlap two models. For instance, if a low-res figure wears a thin shirt, then it makes more sense to overlap the torso voxels with the shirt voxels, rather have the shirt pad a voxel out from the torso.
This pull request adds user control over which models are "on top" by doing the model merging in order of layer. Layers further down are merged after earlier layers, so the further down layers (with higher layer ids) take precedence.
Note: This pull request sits on top of my previous pull request: "Layer visibility affects what voxels are shown in Godot". This pull request is actually 2 commits to a single file, "vox-importer.gd".
When using MagicaVoxel layers, it's sometimes necessary to overlap two models. For instance, if a low-res figure wears a thin shirt, then it makes more sense to overlap the torso voxels with the shirt voxels, rather have the shirt pad a voxel out from the torso.
This pull request adds user control over which models are "on top" by doing the model merging in order of layer. Layers further down are merged after earlier layers, so the further down layers (with higher layer ids) take precedence.
Note: This pull request sits on top of my previous pull request: "Layer visibility affects what voxels are shown in Godot". This pull request is actually 2 commits to a single file, "vox-importer.gd".