Generate Color Palette from Voxel Volume

0
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?

1 Comments
Order By: Standard | Newest | Votes
0
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 103 members have posted 431 times in 104 discussions