PPL
(Redirected from Ppl)
Jump to navigation
Jump to search
PPL files are lightmaps (per-pixel lighting) generated by VRAD for prop_static models that have generatelightmaps enabled. Unlike brush lightmaps, PPL files are always uncompressed RGB888 (24-bit SDR), even when the map is compiled in HDR mode.

To do so in the most basic manner, modify vradstaticprops.h
to replace all mentions of IMAGE_FORMAT_RGB888 with the desired format. If used in conjunction with a modified VBSP, this could be replaced with if statements or switch cases that check for newly assigned static prop flags.


A PPL file can be converted to uncompressed VTF(s) using Ficool2's proptexelvtf.exe (direct download), which can then be used for $lightmap.
File format
The format is super simple, and is as follows:
struct FileHeader_t
{
int version;
unsigned int checksum;
unsigned int imageFormat;
int meshCount;
unsigned int unused[4];
// Immediately after, "meshCount" number of MeshHeader_t headers
};
struct MeshHeader_t
{
unsigned int lod;
unsigned int offset; // Offset from the top of the file to the raw image data in given image format (usually RGB888)
unsigned int length; // Length of the image data, including all mip maps
unsigned int width;
unsigned int height;
unsigned int unused[3];
};
See also
- VHV, the equivalent for vertex-lit props