KatsBits Community

Game Editing => Q3Map / Q3Map2 Compile Errors => Topic started by: kat on June 26, 2015, 01:16:43 AM

Post by: kat on June 26, 2015, 01:16:43 AM
What does this mean

Code: [Select]
******Error MAX_MAP_LIGHTING****

The "LIGHTING" part of MAX_MAP_LIGHTING refers to the lightmaps created for the map.

Lightmap images are created by the third stage of the compile, either by -light using the old light-tracing algorithm or -vlight using MrElusives Volume-casting light algorithm thingy.

Each Drawable Polygon surface has lightmap texture coordinates created for it by the first stage of the compile. The third stage creates the actual lightmap images for each surface, and all of these images are squeezed onto 'pages', with multiple lightmap images on each page. Each of these pages is 128*128 pixels in size, enough to cover 2048*2048 units of brush surface at the standard lightmap resolution (16*16 units per pixel). There is an upper limit on the number of lightmap pages that can be crammed into the BSP, probably about 4mb. That works out to about 80 pages of lightmaps, which is quite a lot of surface area. If all the sections of your maps compile fine individually, then it must be that the lightmap pages created for the combined map are greater than this limit.

There are two solutions to this problem:
Drawable polygons are also created for surfaces that are only partially hidden by structural brushes - and, providing that the drawable polygon is convex, parts of it may still be hidden behind structural brushes, taking up extra lightmap area. If there is a significant amount of the area on a surface hidden by a structural brush, split the surface up until only the visible part exists.