Generate Color Palette from Voxel Volume

Gelibellybeans posted this 22 February 2017

Hi! I want to generate the color palette from a voxel. Any leads on how I could do that?

Order By: Standard | Newest | Votes
GarethIW posted this 22 February 2017

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.

Here's an example script

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

Our 127 members have posted 466 times in 112 discussions