diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2026-08-04 06:50:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-04 06:50:24 +0200 |
| commit | 6b7c0a894fe57dc3855bfa4a923f04011554a6a0 (patch) | |
| tree | c5aa0b57408d024d9b97701860382d288afca057 /docs/assets | |
| parent | c24098a6f4c8e1bb80f5a5ae33fcaded9679b134 (diff) | |
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/images.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/assets/images.md b/docs/assets/images.md index 2e95e0666..42cc6769b 100644 --- a/docs/assets/images.md +++ b/docs/assets/images.md @@ -8,7 +8,7 @@ The build system will also pick up images in `assets/`, allowing modders to add PNG files have suffixes indicating how they are to be converted. For example, a `gDekuStickTex.i8.png` file will be converted to `i8`. -The valid formats are `rgba32`, `rgba16`, `i4`, `i8`, `ia4`, `ia8`, `ia16`, `ci4` and `ci8`. +The valid formats are `rgba32`, `rgba16`, `i4`, `i8`, `ia4`, `ia8`, `ia16`, `ci4`, `ci4_rgba16`, `ci4_ia16`, `ci8`, `ci8_rgba16`, `ci8_ia16`. An optional suffix can be used to indicate the element type of the C array written out, for example `.u32` in `gHylianMan1ShirtTex.i8.u32.png`. The valid array element types are `u64` and `u32`. If omitted, the element type defaults to `u64`. `u32` is only used for unaligned textures. @@ -38,6 +38,8 @@ make VERSION=gc-eu-mq-dbg CI (Color Indexed) images also have a palette or TLUT (Texture Look-Up Table). +The CI formats are `ci4`, `ci4_rgba16`, `ci4_ia16`, `ci8`, `ci8_rgba16`, `ci8_ia16`. The first three indicate a CI4 image. The last three indicate a CI8 image. The `_rgba16` and `_ia16` suffixes indicate that the palette is to be in RGBA16 or IA16 format respectively. By default (if using plain `ci4` or `ci8`) the palette is RGBA16. + PNG images to be converted to CI formats may have a `.tlut_gNameTLUT[_<u32|u64>]` suffix indicating the name and element type (optional, defaults to u64) of the TLUT `gNameTLUT.tlut.rgba16[.<u32|u64>].inc.c` file to write the palette to. If this suffix is omitted, the TLUT will be written to a `gNameTex.tlut.rgba16.inc.c` file named after the CI image. @@ -60,9 +62,6 @@ The build system (`build_from_png`) will find images sharing the same palette by In the matching case of shared palettes, all png files have the same palette, which is written out. Otherwise the images are automatically co-quantized and the resulting images and palette are written out. -Note the N64 supports CI images with IA16 palettes instead of RGBA16 palettes, but OoT doesn't have such textures. -For simplicity, CI images with IA16 palettes are not supported in the build system, and all CI images are assumed to use RGBA16 palettes. - ### Automatic Palette Generation `n64texconv` supports automatically generating palettes when converting a png without a stored palette to a CI formatted image. However note that this process makes a number of assumptions about alpha channel handling for RGBA16 palettes. If using a CI image with an alpha channel it is strongly recommended to pre-generate a palette externally to ensure the results are optimal for the particular use. `n64texconv` will convert the alpha channel to single-bit with a fixed threshold of 128 and set the rgb content of all transparent pixels to transparent black, prioritizing filling the generated palette with visible pixels. This comes at the cost of black texture samples bleeding into visible pixels when filtered. Especially for CI4, since there are only 16 channels it is inadvisable to rely on correct bilinear sampling adjacent to alpha pixels, as storing multiple transparent pixels with different rgb contents will starve the palette of visible colors. |
