Difference between revisions of "Assets.txt"
m |
|||
| Line 1: | Line 1: | ||
[[Category:dreadtool]] | [[Category:dreadtool]] | ||
''This page is still under construction - much of the infrmation is still to be filled'' | ''This page is still under construction - much of the infrmation is still to be filled'' | ||
| + | |||
=== File Structure === | === File Structure === | ||
| Line 33: | Line 34: | ||
// This is a comment. | // This is a comment. | ||
# This is a comment too. | # This is a comment too. | ||
| + | |||
=== Palette definition === | === Palette definition === | ||
| Line 39: | Line 41: | ||
Use the following syntax. | Use the following syntax. | ||
| − | ; $ | + | ; $''rgb'' (color definition) |
A dollar sign ''$'' within palette definition adds one color to the palette. | A dollar sign ''$'' within palette definition adds one color to the palette. | ||
3 hex digits specify the value of red, green and blue components, 4 bits per component (Amiga OCS precision). | 3 hex digits specify the value of red, green and blue components, 4 bits per component (Amiga OCS precision). | ||
| + | Example: | ||
$000 // black | $000 // black | ||
$222 // gray ramp | $222 // gray ramp | ||
| Line 59: | Line 62: | ||
$C00 // red | $C00 // red | ||
$600 // | | $600 // | | ||
| + | |||
| + | Comments are optional, but help. | ||
| + | |||
| + | |||
| + | ; -weight ''<color1> <color2> <weight>'' | ||
| + | |||
| + | Allows to modify likelihood, with which given color pair will be used. | ||
| + | Color order does not matter. ''<color2>'' can be replaced with ''*'' to affect all color combinations with ''<color1>''. | ||
| + | ''<weight>'' equal ''0'' disables given combination. | ||
| + | |||
| + | -weight 13 15 0.5 // reduce usage of yellow-darkred pair (according to the palette above) | ||
| + | -weight 14 * 0 // don't use bright red at all | ||
| + | |||
| + | |||
| + | ; -mainpal | ||
| + | |||
| + | Sets the palette as the main palette to be used for rendering 3D world. | ||
| + | |||
| + | |||
| + | ; -hudpal | ||
| + | |||
| + | Sets the palette as the main palette to be used for HUD drawing (a.k.a. the status bar). | ||
| + | |||
| + | |||
| + | ; -colorspace ''<mode>'' | ||
| + | |||
| + | Specifies the color space in which conversion and dithering error will be computed. | ||
| + | Possible ''<mode>'' values are: | ||
| + | * ''rgb'' - standard RGB space | ||
| + | * ''lab'' - CIE Lab color space | ||
| + | |||
| + | |||
| + | ; -dither ''<mode>'' | ||
| + | |||
| + | Selects the dithering algorithm. | ||
| + | Possible ''<mode>'' values are: | ||
| + | * ''solid'' - best color is chosen to use for entire logical pixel ("vertical" dithering disabled) | ||
| + | * ''full'' - all color pairs are checked and best pair is used for the logical pixel (full "vertical" dithering) | ||
| + | * ''half_closest'' - one color is chosen closest to the target color (ignoring error diffusion), the the second color is picked (with error diffusion) to make best color pair | ||
| + | * ''checker'' - similar to ''full'', but a 2x2 logic pixel block is used, as well as vertical dithering to produce 3 intermediate colors for each color pair | ||
| + | * ''checker_closest'' - similar to ''checker'', but one of the colors is picked for closest, undithered match (as in ''half_closest'' method) | ||
| + | |||
| + | |||
| + | ; -pairorder ''<mode>'' | ||
| + | |||
| + | Selects the order in which colors are placed when coloring logic pixel halves separately ("vertical" dithering). | ||
| + | Possible ''<mode>'' values are: | ||
| + | * ''keep'' - keep the order produced by the dithering method (useful with ''checker'' and ''checker_closest'') | ||
| + | * ''sort'' - colors are placed in order of their index in the palette | ||
| + | * ''rev_sort'' - similar to ''sort'', but the order is reversed | ||
| + | * ''checker'' - produces checkerboard pattern by using ''sort'' or ''rev_sort'' method depending on pixel position | ||
| + | |||
| + | ; -mixpenalty ''<weight> [<wr> <wg> <wb>]'' | ||
| + | |||
| + | When dithering algorithm considers using a color pair instead of a solid color, this option adds error proportional to ''<weight>'' and difference of the two colors considered. | ||
| + | Optionally, per-component weights can be specified controlling influence | ||
Revision as of 00:08, 18 June 2020
This page is still under construction - much of the infrmation is still to be filled
File Structure
The assets.txt file controls what assets are imported, and how the import process is performed.
The file is a list of definition entries. Using one of the following keywords:
- palette
- gfxgroup
Example assets.txt file could have the following structure:
palette Main {
... define palette 'Main' here ...
}
palette HUD {
... define palette 'HUD' here ...
}
... define other palettes if needed ...
gfxgroup Textures {
... specify group contents ...
}
... define other groups and/or palettes ...
Comments
The file accepts both C-style single line comments, and shell-style comments.
// This is a comment. # This is a comment too.
Palette definition
A palette is defined by specifying color values and dithering options. Use the following syntax.
- $rgb (color definition)
A dollar sign $ within palette definition adds one color to the palette. 3 hex digits specify the value of red, green and blue components, 4 bits per component (Amiga OCS precision).
Example:
$000 // black
$222 // gray ramp
$333 // |
$555 // |
$777 // |
$BBB // |
$FFF // white
$343 // green ramp
$573 // |
$774 // |
$004 // blue
$320 // brown
$431 // brown
$CA5 // yellow
$C00 // red
$600 // |
Comments are optional, but help.
- -weight <color1> <color2> <weight>
Allows to modify likelihood, with which given color pair will be used. Color order does not matter. <color2> can be replaced with * to affect all color combinations with <color1>. <weight> equal 0 disables given combination.
-weight 13 15 0.5 // reduce usage of yellow-darkred pair (according to the palette above)
-weight 14 * 0 // don't use bright red at all
- -mainpal
Sets the palette as the main palette to be used for rendering 3D world.
- -hudpal
Sets the palette as the main palette to be used for HUD drawing (a.k.a. the status bar).
- -colorspace <mode>
Specifies the color space in which conversion and dithering error will be computed. Possible <mode> values are:
- rgb - standard RGB space
- lab - CIE Lab color space
- -dither <mode>
Selects the dithering algorithm. Possible <mode> values are:
- solid - best color is chosen to use for entire logical pixel ("vertical" dithering disabled)
- full - all color pairs are checked and best pair is used for the logical pixel (full "vertical" dithering)
- half_closest - one color is chosen closest to the target color (ignoring error diffusion), the the second color is picked (with error diffusion) to make best color pair
- checker - similar to full, but a 2x2 logic pixel block is used, as well as vertical dithering to produce 3 intermediate colors for each color pair
- checker_closest - similar to checker, but one of the colors is picked for closest, undithered match (as in half_closest method)
- -pairorder <mode>
Selects the order in which colors are placed when coloring logic pixel halves separately ("vertical" dithering). Possible <mode> values are:
- keep - keep the order produced by the dithering method (useful with checker and checker_closest)
- sort - colors are placed in order of their index in the palette
- rev_sort - similar to sort, but the order is reversed
- checker - produces checkerboard pattern by using sort or rev_sort method depending on pixel position
- -mixpenalty <weight> [<wr> <wg> <wb>]
When dithering algorithm considers using a color pair instead of a solid color, this option adds error proportional to <weight> and difference of the two colors considered. Optionally, per-component weights can be specified controlling influence