Sponsored Adverts

Author Topic: Error MAX_MAP_LIGHTING  (Read 3551 times)

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2361
Error MAX_MAP_LIGHTING
« on: June 26, 2015, 01:16:43 AM »
Problem
What does this mean

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

Solution
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:
  • Easy but lower quality - use 32*32 units per LM pixel resolution.
    - q3map -samplesize 32 mapname
    - q3map -vis -saveprt mapname
    - q3map -vlight -samplesize 32 mapname
  • More difficult but much better result - reduce the total surface area of the drawable polygons in the map. This will reduce the number/size of the lightmaps, reducing the number of lightmap pages created, reducing the total size of the lightmaps in the .bsp. Drawable polygons are created for a surface even when that surface is hidden by a detail brush. Apply textures/common/caulk to these surfaces, or delete them entirely if they are patches.
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.

 

Sponsored Adverts
RSS Copyright © 2019 KatsBits™. All Rights Reserved. No part of this or associated properties shall be reproduced without prior consent. AdvertisePrivacy PolicyDMCA (about DMCA) • Copyright PolicyCopyright Contact Home Blog Support About Contact Site Search Site Map RSS feed Forum YouTube FaceBook LinkedIn Twitter Instagram IMVU