PaletteDefinition

From wiki
Jump to: navigation, search

A palette is defined using a .palette file and a .vox file.

Stelumi loads all voxel assets as 8bit 255+empty paletted colors and a palette needs to be applied to be rendered to the screen.


Scrollable palette animations can be done by adding a 'scroll' animation

"animations": [
  {
    "kind": "scroll",
    "from": 123, // index of the first color in the sequence
    "count": 123, // length of the sequence
    "fps": 10, // how many changes per second should be applied
    "interpolation": true/false, // if colors should be smoothly interpolated 
  }
]


The palette can define extended attributes for colors:

  • Emissive
  • Roughness
  • Metalness
  • Iridescence

in MagicaVoxel you can access those by going to the 'Render' mode then selecting a palette entry, then in the 'Matter' tab in the material mode. Here you can pick a number of material modes, Stelumi ignores which mode you select and uses the values you configure for a mode.

  • Emissive is set using the 'Emission' value under 'Emit'
  • Roughness is set using the 'Roughness' value under 'Blend'/'Metal'/'Glass'
  • Metalness is set using the 'Metallic' value under 'Blend'/'Metal'
  • Iridescence is set using the 'IOR' value under 'Blend'/'Metal'/'Glass' (a value between 1.48 and 3.0 is used)

when Iridescence is used Metalness is always set to full.