Tag - Bitmap (bitm)
Use - Visual Bitmaps
Tag Layout
Code: Select all
// See Type
<enum16 name="Type" offset="0" >
<option name="2D Textures" value="0" />
<option name="3D Textures" value="1" />
<option name="CubeMap" value="2" />
<option name="Sprite" value="3" />
<option name="UI Bitmap" value="4" />
</enum16>
//See Format
<enum16 name="Format" offset="2" >
<option name="DXT1 Encoded" value="0" />
<option name="DXT2/3 Encoded" value="1" />
<option name="DXT4/5 Encoded" value="2" />
<option name="16-Bit Colour" value="3" />
<option name="32-Bit Colour" value="4" />
<option name="Monochrome" value="5" />
</enum16>
//See Usage
<enum16 name="Usage" offset="4" >
<option name="Alpha Blend" value="0" />
<option name="Default" value="1" />
<option name="Height Map" value="2" />
<option name="Lightmap" value="3" />
<option name="VectorMap" value="4" />
</enum16>
<bitmask16 name="Format" offset="6" >
<option name="Diffusion Dithering" value="0" />
<option name="Disable Height map compression" value="1" />
<option name="Uniform sprite sequences" value="2" />
<option name="Filthy sprite bugfix" value="3" />
</bitmask16>
<float name="Detail Fade Factor" offset="8" />
<float name="Sharpen Amount" offset="12" />
<float name="Bump Height" offset="16" />
<enum16 name="Sprite Budget chunksize" offset="20" >
<option name="32x32" value="0" />
<option name="64x64" value="1" />
<option name="128x128" value="2" />
<option name="256x256" value="3" />
<option name="512x512" value="4" />
</enum16>
<short name="Sprite Budget Count" offset="22" />
<short name="Colour Plate Width" offset="24" />
<short name="Colour Plate Height" offset="26" />
<int name="Compressed Colour Plate Data" offset="28" />
<unused offset="32" chunksize="12" />
<float name="Blur Filter chunksize" offset="44" />
<float name="Alpha Bias" offset="48" />
<short name="MipMap Count" offset="52" />
<short name="Sprite Usage" offset="54" />
<short name="Sprite Spacing" offset="56" />
<unused offset="58" chunksize="2" />
<reflexive name="Squences" offset="60" chunksize="60" >
<string32 name="Name" offset="0" />
<short name="First Bitmap Index" offset="32" />
<short name="Bitmap Count" offset="34" />
<unused offset="36" chunksize="16" />
<reflexive name="Sprites" offset="52" chunksize="32" >
<int name="Bitmap Index" offset="0" />
<unused offset="4" chunksize="4" />
<float name="Left" offset="8" />
<float name="Right" offset="12" />
<float name="Top" offset="16" />
<float name="Bottom" offset="20" />
<float name="Reg Point X" offset="24" />
<float name="Reg Point Y" offset="28" />
</reflexive>
</reflexive>
<reflexive name="Bitmap Data" offset="68" chunksize="116" >
<tag name="Tag" offset="0" />
<short name="Width" offset="4" />
<short name="Height" offset="6" />
<short name="Depth" offset="8" />
<short name="Type" offset="10" />
<short name="Format" offset="12" />
<bitmask16 name="Flags" offset="14" >
<option name="^2 Dimensions" value="0" />
<option name="Compressed" value="1" />
<option name="Palettized" value="2" />
<option name="Swizzled" value="3" />
<option name="Linear" value="4" />
<option name="v16u16" value="5" />
<option name="HUD Bitmap?" value="7" />
<option name="Always on?" value="9" />
<option name="Interlaced?" value="12" />
</bitmask16>
<short name="Reg X" offset="16" />
<short name="Reg Y" offset="18" />
<short name="MipMap Count" offset="20" />
<short name="PixelOffset" offset="22" />
<int name="Zero" offset="24" />
<int name="LOD1 Offset" offset="28" />
<int name="LOD2 Offset" offset="32" />
<int name="LOD3 Offset" offset="36" />
<unused offset="40" chunksize="12" />
<int name="LOD1 chunksize" offset="52" />
<int name="LOD2 chunksize" offset="56" />
<int name="LOD3 chunksize" offset="60" />
<unused offset="64" chunksize="12" />
<id name="ID" offset="76" />
<unused offset="80" chunksize="8" />
<bitmask32 name="Flags(CBZ)" offset="88" />
<unused offset="92" chunksize="4" />
<int name="Unknown(CBZ)" offset="96" />
<int name="Unknown(CBZ)" offset="100" />
<int name="Unknown(CBZ)" offset="104" />
<int name="Unknown(CBZ)" offset="108" />
<unused offset="112" chunksize="4" />
</reflexive>
Type
Type controls bitmap geometry. All dimensions must be a power of 2 except for SPRITES and INTERFACE.
Bitmaps:
- 2D Textures: Ordinary 2D textures.
- 3D Textures: Volume textures will be generated from each sequence of 2D texture slices.
- Cube Maps: Generated from each consecutive set of six 2D textures in each sequence, all faces of a cubemap must be square and the same size.
- Sprites: Sprite texture pages.
- Interface Bitmaps: similar to 2D textures but without mipmaps and without the power of 2 restriction.
Format
Format controls how pixels will be stored internally.
Compressions:
- DXT1: Compression using 4 bits/pixel. 4x4 blocks of pixels are reduced to two colors and interpolated, alpha channel uses color-key transparency instead of alpha from the pallet.
- DXT2/3: Compression using 8 bits/pixel. Same as DXT1 without the color-key transparency, alpha channel uses pallet from alpha quantized down to 4bits/pixel.
- DXT4/5: Compression using 8 bits/pixel. Same as DXT2/3 except alpha is smoother. Better for smooth alpha gradients, but worse for noisy alpha.
- 16-Bit Color: Uses 16 bits/pixel. Depending on the alpha channel, bitmaps are quantized to either R5G6B5(no alpha), A1R5G5B5(1-Bit alpha), or A4R4G4B4(> 1-Bit alpha).
- 32-Bit color: Uses 32 bits/pixel. Very high quality and can have alpha at no added cost. This format takes up the most memory however. Bitmap formats are X8R8G8B8 and A8R8G8B8.
- Monochrome: Uses either 8 or 16-bits/pixel. Bitmap formats are A8(alpha), Y8(intensity), AY8(Intensity & Alpha combined), and A8Y8(Separate Alpha & Intensity).
Usage
Usage controls how mipmaps are generated.
- Alpha Blend: Pixels with zero alpha are ignored in mipmaps, yo prevent bleeding the transparent color.
- Default: Downsampling works normally, as in Photoshop.
- Height Map: The bitmap (normally grayscale) is a height map that gets converted to a bump map. Alpha is passed through unmodified.
- Detail Map: Mipmap color fades to gray. Alpha fades to white.
- Light Map: Generates no mipmaps.
- Vector Map: Used mostly for special effects; pixels are treated ad XYZ vectors and normalized after downsampling. Alpha is passed through unmodified.