Hi! I want to generate the color palette from a voxel. Any leads on how I could do that?
Generate Color Palette from Voxel Volume
Because PicaVoxel doesn't use an indexed palette (like MagicaVoxel for instance), each voxel can have its own unique colour. Therefore, the only way to get a list of all of the colours used on a model is to iterate over all of the voxels and find the unique colours.
Note that this will only get the palette of colours used in the first animation frame of a volume. If you want to get the palette of all colours used over all animation frames, you will need to do a foreach() over Volume.Frames.
Last edited 22 February 2017