Skip to content
RED+
Contents

Lighting

Lightmap detail and file size

Two settings decide how many texels a surface's lightmap gets. Quality in Level Properties sets the texels per unit. Lightmap detail sets the largest lightmap one surface can have and the size of the pages lightmaps are packed into. Together they decide how sharp lighting can get on large floors and walls, and how big the lightmap data in the level file is.

Quality levels

QualityTexels per unit
Draft2 (stock RED)
Good (the default)4
High8
Ultra16
Extreme32

Each surface gets as many texels as its size needs at that density, up to the Lightmap detail limit on each side. A face's own Lightmap Resolution in Face Properties changes its texels per unit, still up to the same limit. Quality also sets the ray counts; see Lighting settings in Level Properties.

Where to set Lightmap detail

  • In Level Properties: Lightmap detail in the Lighting group.
  • In redplus.ini in the RED+ folder: lightmap_detail under [lighting].

It is an editor setting, not a level setting. It applies to every level you bake.

The choices

In Level PropertiesIn redplus.iniLimit (texels per side)PageNotes
Standard - stock sizestandard64128Stock RED sizes. Smallest files, softest shadows.
2x - wastes half of each page2x90128Not recommended.
4x - recommended4x128256The default. Four surfaces at the limit fill a page.
8x - wastes half of each page8x180256Not recommended. Takes as much space as high for half the detail.
Maximum - sharpest, largest fileshigh255256The sharpest the level format allows. Files about 3.5 times the size of 4x.

If lightmap_detail is missing from redplus.ini, RED+ uses 4x. A value that is not one of these five counts as standard. Clicking OK in Level Properties writes the list's choice to the file.

How it affects sharpness and size

RED gives faces that lie in one plane, in the same room, one shared lightmap. RED+ keeps such a group from growing past the limit: a group wider than the limit allows at the current Quality is split into tiles, each about the limit divided by the texels per unit across, and every tile keeps the full texels per unit.

Lightmap detailDraftGoodHighUltraExtreme
4x63 m31.5 m15.8 m7.9 m3.9 m

The table gives the widest tile at 4x. A single face wider than that cannot be split. It is held at the limit, so its texels cover more ground and its lighting is softer. Small surfaces come out the same at every Lightmap detail.

  • Large floors and walls sit at the limit or are split into tiles at it, so the file's size depends on how many limit-sized squares fit on one page. Standard, 4x and Maximum fill their pages. 2x and 8x leave about half of every page empty.
  • The choice does not change which games can load the level. See Which game plays what RED+ saves.
  • Show Lightmap Density outlines each lit face by its texel density.

The 32,767 surface limit

Red Faction allows at most 32,767 lightmap surfaces in a level's geometry, and the game has the same limit. Tiles count as surfaces, and the number of tiles on a large flat area grows with the square of the texels per unit, so Ultra and Extreme reach the limit first.

When lightmaps are laid out and the level would go past the limit:

  1. RED+ makes the tiles on large flat areas larger, step by step, until the level fits. Those areas then get fewer texels per unit than the rest of the level.
  2. If even RED's own grouping without tiles does not fit, the faces past the limit get no lightmap.
  3. At the end of the bake a message says what was done, for example "Large flat areas were split into 16-unit tiles instead of 8-unit tiles". The log has a line containing [RF+ Lightmap] surface ceiling:.

This is not a setting: it applies only to the layout it happens in, and the next Calculate Maps and Light starts again with full-size tiles. A lower Quality makes fewer, larger tiles.

Before that point, a line containing within 10% of RED's hard limit in the log warns that a level is close to it.

When a change takes effect

  1. Choose the detail in Level Properties and click OK, or edit redplus.ini.
  2. Restart RED+. The setting is read when RED+ starts, and Level Properties shows (applies after restart) beside the list.
  3. Open the level and run Level, Calculate Maps and Light.

Good to know

  • When RED+ starts, a line containing [RF+ Lightmap] lightmap detail: in the log shows the detail in use.
  • With 2x or 8x, the log warns at start-up that about half of every page is empty.
  • A level baked at a higher detail than the one set still relights normally. Its surfaces keep their size until you run Calculate Maps and Light.