|
The C_Reduction menu cell in the Tools module lets you create a corresponding palette for a scene or create a colour-indexed image which uses a reduced palette.
When you choose the C_Reduction menu cell, the Colour Reduction dialogue box is displayed.
In this dialogue box, you can load an image or sequence and from it, create:
Alternately, instead of creating a new colour palette, you can load an image, then load an existing palette and use it to generate a colour-indexed image or sequence.
By editing the palette, you can alter the colours of the generated image. Alternately, you can change some of the generation parameters and repeat the process, generating new palettes and versions of the colour-indexed image until you are satisfied with the results.
For information on using Colour Reduction, see the Reducing the Number of Palette Colours section in the Defining Materials and Textures User's Guide.
Original Picture
This area includes the Load button and the display area of the input image used to generate a colour-indexed image and a colour palette.
This input image is always treated as an RGB image (also known as the "true colour" image. For example, where each pixel encodes red, green, blue, and alpha channel values). Even if the image you are loading is colour-indexed, it is treated as an RGB image so no accompanying colour palette is displayed. For example, the current palette is not modified.
Above the image are the width and height of the image, and the number of distinct RGB colours it uses.
If the alpha is selected, this number also considers the alpha channel value to compare colours.
Load
When you click on this button, a file browser is displayed. Choose the file type you wish to load. You can filter files appearing in the browser by selecting a specific file type.
Note:
If the environment variable SI_IMAGE_PATH is not defined, the only format that appears is "all." This variable points to the Image Library's list of DSOs. Normally, this variable is set to /softimage_installdir/3D/dso/sil.Display Area
This area displays the image you loaded. Depending on the size of the image, not all of it may be visible in the display window; however, you can pan and zoom on the image as described in Supra Keys.
Once you have generated a corresponding colour-indexed image, you can select a pixel in the original image, and modify the foreground or background entry in the palette. For more information, see the Working with the Colour Palette section in the Defining Materials and Textures User's Guide.
Resulting Picture
This area shows you the resulting image, located beside the original image for easy comparison. The image displayed is based on your colour reduction specifications. Above the image, the number of palette entries used is displayed.
Save
Saves the resulting colour-indexed picture in any of the supported true-colour or colour-indexed file formats in the image library When saving a colour image in true-colour format, each pixel's reference in the palette is replaced by the colour stored in that palette entry. When you click this button, a file browser is displayed. Choose the file type you wish to save. You can filter files appearing in the browser by selecting a specific file type.
Note:
If the specified format is "non-palettized" (RGB only), this action does not save any work done on the palette. To save the palette, click the SaveP button in the lower-right of the dialogue box.Display Areas
Selecting a pixel in the Resulting Picture's image with the left mouse button automatically changes the foreground entry to the entry referred to by the pixel. Selecting a pixel in the Original Picture's image with the left mouse button changes the foreground entry's colour values. If you select the pixel with the middle mouse button, the entry it references becomes the background entry. For more information, see the Working with the Colour Palette section in the Defining Materials and Textures User's Guide.
For information on selecting pixels, panning and zooming, see Supra Keys.
Alpha
When the Alpha option is selected, the alpha channel is taken into consideration when generating the palette.
When Alpha is not selected, and you generate, the image is generated with its alpha channel to the maximum value (opaque).
Note:
If Alpha is selected, two pixels with the same RGB colour but different alpha values, are considered to be different colours. However, if Alpha is not selected, two pixels with the same RGB colours, but with different alpha values are considered to be identical.Sequence
When the Sequence option is selected, you can apply colour reduction to a sequence of images.
You can load a single image in a sequence and apply colour reduction to all or part of the sequence. For example, if the sequence includes
robot.1.pic
torobot.100.pic
, you may load any image between 1 and 100, such asrobot.40.pic
and apply colour reduction to only that image.You can choose whether to apply the current palette to all images in the sequence, regenerate a palette for each image, or generate the palette that most accurately represents the images.
When you select the Apply Dith or Apply Undith options in the Pal. Oper. menu to begin the reduction, a browser is displayed in which you enter the prefix for the resulting images, and select an output image type. For example, if you enter
robot
, the .<number>.<format> are added automatically, resulting in:
robot.1.pic
....
....
robot.100.pic.
Start and End Frame
Allows you to set the Start and End frame values for the colour reduction sequence.
Step
This increment allows you to skip frames. For example, if you select 4, every fourth frame is rendered. If you leave the default step at 1, every image within the range is reduced.
Palette
- Compute regenerates an individual palette for every image.
- Current applies the current palette on all images.
- Best generates the best palette for the whole sequence.
For information on the Palette, see the Working with the Colour Palette section in the Defining Material and Textures User's Guide.
Note:
All colour palette operations work on either the whole palette or on a selection of entries.Pal. Oper. Menu
Apply Dith.
Applies dithering to the palette. This creates a new, dithered colour-indexed image using the colour palette. When you select the Apply Dith. option, a browser is displayed in which you enter the prefix for the resulting images, and select an output image type.
Apply Undith.
The Apply undith option creates a new, undithered colour-indexed image using the current palette. When you select the Apply Undith. option, a browser is displayed in which you enter the prefix for the resulting images, and select an output image type.
Generate
When you select the Generate option, the Palette Parameters dialogue box appears in which you can enter the number of colours and bits per colour channel, as well as the method: median, average, and pixel average.
Specifies the number of entries the colour palette contains. The minimum you can specify is 2, the maximum 65536, and the default is 256.
Note:
If multiple palette entries are selected, you can't change the number of colours, nor the number of bits per colour channel; instead, the number of non-locked entries in the selection is displayed.Specifies the total range of colours in the palette. The minimum you can specify is 2, the maximum is 8 (which is also the default).
Bits per RGB channel Number of possible colours 8 16,777,216 7 2,097,152 6 62,144 5 32,768 4 4096 3 512 2 64 When generating a colour-indexed image, SOFTIMAGE 3D considers how many pixels use each distinct RGB colour in the original image.
When the number is relatively low, such a colour is grouped with others with similarly limited use. These colours are combined to make a single colour index in the generated palette, according to the generation method specified here.
- Median: Each resulting colour occupies the median position in the colour groups previously described.
- Average: Each resulting colour is the RGB average of all colours in the group.
- Pixel Average: Each resulting colour is the RGB average of the group, weighed by the number of pixels for each colour.
Nb. of Pixels
These fields apply only to the Colour Index mode.
Foreground
Displays the number of pixels of the colour-indexed image that are referencing the foreground entry.
Background
Displays the number of pixels of the colour-indexed image that are referencing the background entry.
Selection
Displays the number of pixels of the colour-indexed image that are referencing all the selected palette entries.
Reindex Image
Reindexing an image is the redirection or change of references of the image pixels toward new palette entries. Reindexing an image only applies to colour-indexed images.
When you select the Reindex Image option, you are indicating that the references in the colour-indexed image should be updated when palette entries are moved. For example, if you swap palette entry #3 with palette entry #4, the reindexing updates every pixel in the image that is referring to #3 with a value of #4 and vice versa.
The appearance of the image is not affected by swapping entries in the palette because the pixels that were painted with the colour stored in palette entry #3 are now painted with palette entry #4, which is in the new position of palette entry #3 (the same applies for palette entry #4). Basically, the palette entries have been reorganized.
If you do not select the Reindex Image option, the pixels are not redirected, so the pixels in the image that were painted with the colour stored at palette entry #3 are still painted with the colour stored at entry #3. However, since the content of palette entry has been exchanged with the content of palette entry #4, all of these pixels have a different colour. If the entry #3 was blue and entry #4 was red, the blue and red colours in the image have been swapped. This feature can be used to produce interesting effects, such as image inversion.
The following palette options are always affected by Reindex Image: Swap, Invert, Sort, and Cut. The following operations are affected by Reindex Image when there is no selection: Paste Before, Paste After, and LoadP.
In the Optimize operation, reindexing is always performed whether or not the Reindex Image option is selected.
Size of:
Palette
Indicates the size of the palette. You can edit the palette size with this text box.
If your palette has 256 entries and you reduce the palette to 32 entries, only 32 entries are now visible. If you enter 256 again, the first 32 entries don't change, but the remaining entries are all black.
If at any time you want to return to the original palette, click the Undo button.
Selection
Indicates the number of selected entries in the palette.
Buffer
Indicates the number of entries in the palette clipboard. The only palette operations that put entries in the palette clipboard are Cut and Copy.
Undo
Undoes the last operation.
Redo
Redoes the last operation; that is, undoes the last undo operation.
LoadP
If you wish to load an existing colour palette, rather than generate one from scratch, click the LoadP button. A file browser allows you to load a palette (.PAL) file or extract a palette file associated with an image. For example, select a Digitizer (.DGT) file and load the palette associated with it.
SaveP
Lets you save only the palette. A file browser appears, allowing you to save a palette in both PAL and DGT formats.
This button does not save the colour-indexed image. To do this, click Save above the display of the colour-indexed image.
Exit
Exits the dialogue box without prompting you to save the current palette or the colour-indexed image.
Supra Keys
This table summarizes the use of Supra keys in the Colour Reduction dialogue box in either the RGB or colour-indexed image displays.
Supra key Mouse button Action z Left Pans Middle Zooms in, centre toward the mouse Right Zooms out a Frames all u Left Undoes action u Right Redoes action Esc Terminates an operation In the colour palette: l Left Locks l Middle Unlocks l Right Toggles lock modes Shift Left New selection Shift Middle Adds to selection Shift Right Clears selection Anywhere in the dialogue box: Esc Terminates an operation
Note:
If the image has a higher resolution than the number of pixels contained in the display area, then the image is not totally visible. In this case, it might be necessary to pan
(z-left-click and drag) to see the regions of the image that are not visible.
Last updated 03-apr-1998