Skip to content

An attempt at generating all possible pixelmap types from a reference file.

License

Notifications You must be signed in to change notification settings

Toshiba-3/BRender-pixelmap-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BRender pixelmap types

also various versions of BRender TEXCONV.

As most BRender-based games used the same pixelmap types (INDEX_8, RGB_565, RGBA_4444, RGBX_888), the other types are rare or non-existant. In order to create a parsing template, examples were needed. All pixelmaps supplied here were generated by BRender TEXCONV (the conversion tool supplied with the BRender SDK) with a few exeptions.

  • Filenames are always the pixel type and optional features (embedded palette, mipmaps).
  • A few are pixelmap file types 0x03 (older pixelmap). It only makes a difference for mipmaps.
  • ref_8888.tga is the reference used to create all pixelmaps.
  • CARMA_16.PAL and CARMA256.PAL are the BRender palettes used to generate the indexed pixelmaps. Their Photoshop counterpart are also present (.ACT files) and Targa images to visualize them (1px wide, then 16/256px high).

INDEXA_88 cannot be generated, nor could an existing example be found. TEXCONV seems to read it but it isn't certain that the pixel data format is correct -- it's been assembled manually, assembling the index_8 and alpha_8 together. Current format is I A I A I A I A I A... this is what seems to be expected according to the TEXCONV source when it tries to read this format.

ALPHA_8 was simply generated from the reference targa alpha as an indexed 8bit image using a greyscale palette. It seems to be correct as TEXCONV can load it and export a proper black RGBA image with the correct alpha channel.

RGBA_4444 and ARGB_4444 seem to be mixed up somehow. Their PixelmapType entry in the TEXCONV source are swapped. Generated pixelmaps in this project might be swapped too :)

The only existing example of an INDEX_4 pixelmap is in the Saturn/DOS test demo from the Alien Odyssey source (and used specifically for storing the texture bits of the Saturn models). More about it there: "Alien Odyssey source code found for Sega Saturn" at Sega Extreme Forums.

0x03 pixelmap file type (as generated by older TEXCONV) doesn't seem to have expected support for mipmaps. Texconv will generate them all from base size down to 1x1 and save each as an individual pixelmap entry with suffix _0, _1, _2 etc appended after the pixelmap identifier. However, 0x3D version (via texconv-win) has that mip_offset (uint16 just before the pixelmap identifier) info which indicates after how many rows of pixels the second level starts. The engine can deduce the rest. Pixels from all levels are contiguous, no padding at all in-between them.

List of included examples:

  • embedded palettes (both 0x03 and 0x3D file types)
  • mipmapped pixelmaps (both 0x03 and 0x3D file types)

Each pixel is an index into a colour map

  • 0x02 BR_PMT_INDEX_4
  • 0x03 BR_PMT_INDEX_8

True colour RGB

  • 0x04 BR_PMT_RGB_555 (16 bits per pixel)
  • 0x05 BR_PMT_RGB_565 (16 bits per pixel)
  • 0x06 BR_PMT_RGB_888 (24 bits per pixel)
  • 0x07 BR_PMT_RGBX_888 (32 bits per pixel)
  • 0x08 BR_PMT_RGBA_8888 (32 bits per pixel)

Opacity

  • 0x0D BR_PMT_ALPHA_8 (generated manually)

Opacity + Index

  • 0x0E BR_PMT_INDEXA_88 (generated manually)

Wrong way around 15 bit true colour

  • 0x11 BR_PMT_BGR_555

16 bit r,g,b & alpha

  • 0x12 BR_PMT_RGBA_4444 (might be swapped with the one below)
  • 0x20 BR_PMT_ARGB_4444

TEXCONV

This project also includes various versions of BRender TEXCONV:

  • TEXCONV 2.3 (1996) - DOS (from the BRender SDK for PS1)
  • TEXCONV 2.4 (1996) - DOS
  • TEXCONV 1.1 (1997) - DOS (compiled by maarten, thanks!)
  • TEXCONV 1.1 (1997) - WIN (compiled by maarten, thanks!)

Version 1.1 is indeed more recent than 2.x and is compiled from the BRender v1.3.2 release: texconv source folder.

Also included are various examples of command lines in a .bat file. And text file describing the commands and noting a few remarks.

TEXCONV 1.1 will only generate the last version of pixelmaps (0x3D) while TEXCONV 2.x outputs the older one (0x03). Reading/writing BR_PMT_INDEX_4 seems broken in 1.1, use 2.3 or 2.4 instead. Reading/writing BR_PMT_RGBA_4444 and BR_PMT_ARGB_4444 are swapped in 1.1. Alpha toggle (-a) and pixelmap naming (-N) don't work in 2.3. It isn't certain any version reads INDEXA_88 properly.

For converting some pixelmaps back to TGA, it is advised to convert to BR_PMT_RGB_888 before exporting in case colours seem incorrect (converting from RGB_565 for example).

Generating mipmaps appears to only work properly for types RGB_888, RGB_565, RGB_555, and INDEX_8. Manually assembling a mipmapped pixelmap for unsupported types might work. TEXCONV 1.1 might happen to miss the correct EOF and write data beyond it, this can be deleted manually. Pay also attention to the end null padding (8x 0x00).

About

An attempt at generating all possible pixelmap types from a reference file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published