Palette editors

cpfg and lpfg models can use one of two color modes: color map mode or material mode. In each mode, colors are selected from a palette of 256 entries. In color map mode, these entries are simple colors — RGB triples. In material mode, these entries are material properties: ambient color, diffuse color, specular color, emitted color, shininess, and transparency.

L-studio provides an editor for each of these modes. Both the color map editor and the material editor are accessed through the Color tab. You can switch between them with the Use materials / Use colormap button in the bottom left corner of the editors.

The color map editor

Color map editor

The 256-entry palette is shown in the middle of the editor. A palette entry is selected by clicking on the corresponding square. The color number will be shown at the top left. Values for the RGB components of the selected entry are set using the three sliders located above the palette.

Clicking the right mouse button on the palette pops up a menu with the following options:

A range of palette entries can be selected by clicking on the first entry, then clicking on the last entry while holding down the Shift key. When a range is selected two additional commands are available through the popup menu:

cpfg and lpfg use color 0 as the background color.

To switch to material mode press the Use materials button.

The material editor

Material editor

The material editor acts on a single material selected from the palette at the bottom of the window; the material's number is displayed below the sliders on the top right. A preview of the selected material is shown on the top left. The top three sliders are used to set the ambient, diffuse, and specular reflection coefficients. The fourth slider similarly controls the intensity of light emitted. To change the corresponding reflected and emitted colors, click the button on the right side of the respective slider. This brings up a color selection dialog box. The bottom two sliders control the shininess and transparency of the material.

All changes made using the sliders affect the preview version of the material (in the top left part of the editor) only. To save the new material parameters to the palette:

To discard changes in the material:

Copy and paste:

To copy a single material, right-click on it in the palette and select Copy from the popup menu. To copy a range of materials, first select the range by clicking on the first material, then holding down the Shift key and clicking on the last material. Finally, right-click over the range, and select Copy from the popup menu.

To paste materials, right-click on the first material in the palette into which you want the materials to be pasted and select Paste from the popup menu.

Interpolation:

To smoothly change material properties over a range of materials, select the range by clicking on the first material and then holding the Shift key down while clicking on the last material. Right-click over the range and select Interpolate from the popup menu.

cpfg and lpfg use the emission of material 0 as the background color.

To switch to the colormap editor, push the Use colormap button.