KatsBits Community

MAX_MAP_EDGES

kat · 1 · 28075

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3139
    • KatsBits
What is MAX_MAP_EDGES?
As the error name suggests, this crops up during the compiling of *.maps when they contain more than an allowable limit of EDGES.

A polygon (commonly called 'tris' in mapping parlance), as used by game engines, is constructed of three distinct elements;
  • Face (the bit you see in game)
  • Vertexes (points of reference in 3D space)
  • Edges (connections between vertexes)
Each of these 'elements' has a physically hard coded limit in the engine; a maximum number of allowed 'units' (of that element type) over which the compile process with stop if breached, so in the case of MAX_MAP_EDGES, the limit of 60,000+ (or thereabouts) has been exceeded resulting in the compiler crashing and spitting out that message.

Why does it MAX_MAP_EDGES happen?
It usually happens as a result of badly constructing your map, specifically 'where' and 'how' brushes butt up to each other.

Quote
Design note: 'bad' in this context can mean overly detailed brushwork (a map full of fiddly brushwork or detailed architectural features) as opposed to poorly made/constructed brushwork; this error can occur irrespective.

Depending on what compiler options were used, it will create an extra vertex or split where brushes butt up to each other; this is done to prevent a number of related issues ("sparklies") but as an 'optimisation' method it inadvertently causes the max map edges error.

How can I fix MAX_MAP_EDGES?
Generally there are two ways to fix it;
  • Better map construction techniques
  • Converting brushwork to models
Better construction methods means paying closer attention to how brushes are connected to each other; a general rule of thumb is to try and make things 'even', and 'neat' rather than haphazard based on the assumption that the compiler will 'fix' it. It won't and as shown above, the process will tell you.

Converting brushwork to either ASE or LWO models (if the game allows for it) is the better option as models tend to be 'optimised' already. The kind of things that are generally regarded as good candidates for conversion to models are any elements that get used repeatedly, anything that's overtly detailed (has tiny physical features) or objects that are placed or rotated at odd angles.