The code was adding a black (0, 0, 0) palette entry in front of all the quantised colour entries when in fact this shouldn’t be done.
This means that in the resulting Vox model, everything that should have the first (index 0) palette colour actually has the black colour, then everything that should have the 2nd (index 1) palette colour has the 1st palette colour, and so on.
Note: The spec for the Vox format says that the indexes of your palette entries end up getting +1’d, due to the ‘empty’ reserved value, but doesn’t say that you should put any kind of dummy value at index 0.
Btw, if you'd like to keep the original behaviour for backwards compatibility and have this fix activated by an optional parameter to from_dense, let me know, and I'll amend the PR.
The code was adding a black (0, 0, 0) palette entry in front of all the quantised colour entries when in fact this shouldn’t be done.
This means that in the resulting Vox model, everything that should have the first (index 0) palette colour actually has the black colour, then everything that should have the 2nd (index 1) palette colour has the 1st palette colour, and so on.
Note: The spec for the Vox format says that the indexes of your palette entries end up getting +1’d, due to the ‘empty’ reserved value, but doesn’t say that you should put any kind of dummy value at index 0.