PPL: Difference between revisions
Jump to navigation
Jump to search
Code Fix:Being always RGB888 is a VRAD limitation, not a format or engine one; a custom compiler could make DXT1, I8, or even RGBA16161616F lightmaps, and these would be properly loaded by the game.
Garry's Mod, which uses a separate _hdr.ppl for HDR lighting.
Important:To account for potential discrepancies between UV maps of LoD models, PPL files contain a lightmap for each LoD model. This can greatly increase the file size of a map if a lightmapped model has several LoD models!
SirYodaJedi (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
{{code fix|Being always RGB888 is a VRAD limitation, not a format or engine one; a custom compiler could make DXT1, I8, or even RGBA16161616F lightmaps, and these would be properly loaded by the game. | {{code fix|Being always RGB888 is a VRAD limitation, not a format or engine one; a custom compiler could make DXT1, I8, or even RGBA16161616F lightmaps, and these would be properly loaded by the game. | ||
To do so in the most basic manner, modify {{file|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]].}} | To do so in the most basic manner, modify {{file|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]]. | ||
This is fixed in {{gmod|2}}, which uses a separate {{code|_hdr.ppl}} for HDR lighting.}} | |||
{{modernImportant|To account for potential discrepancies between [[UV map]]s of [[$lod|LoD]] models, PPL files contain a lightmap for each LoD model. This can greatly increase the file size of a map if a lightmapped model has several LoD models!}} | {{modernImportant|To account for potential discrepancies between [[UV map]]s of [[$lod|LoD]] models, PPL files contain a lightmap for each LoD model. This can greatly increase the file size of a map if a lightmapped model has several LoD models!}} |
Revision as of 10:56, 24 January 2025
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.
See also
- VHV, the equivalent for vertex-lit props